Method Summary |
void
|
Applies a skin in the current theme to a control.
|
void
|
Applies a stylesheet skin in the current theme to a control.
|
void
|
|
void
|
|
void
|
Ensures the control is rendered within a form.
|
TStack
|
|
TCallbackClientScript
|
Gets the callback client script handler that allows javascript functions to be executed during the callback response.
|
string
|
Callback parameter is decoded assuming JSON encoding.
|
TControl
|
|
TClientScriptManager
|
|
string
|
Returns the state to be stored on the client side.
|
boolean
|
|
boolean
|
|
boolean
|
|
boolean
|
|
TForm
|
|
THead
|
|
boolean
|
|
boolean
|
|
boolean
|
|
boolean
|
Returns whether user input is valid or not.
|
string
|
|
string
|
|
TControl
|
|
array
|
Get a list of IDs of controls that are enabled and require post data.
|
string
|
|
IPageStatePersister
|
|
string
|
|
TTheme
|
|
TTheme
|
|
string
|
|
TList
|
Returns a list of registered validators.
|
protected
boolean
|
|
protected
void
|
Loads page state from persistent storage.
|
void
|
This method is invoked right after the control has loaded its state.
|
void
|
Raises OnInitComplete event.
|
void
|
Raises OnLoadComplete event.
|
void
|
Raises OnPreInit event.
|
void
|
Raises OnPreLoad event.
|
void
|
Raises OnPreRenderComplete event.
|
void
|
Raises OnSaveStateComplete event.
|
protected
void
|
Sets Adapter to TActivePageAdapter and calls apter to process the callback request.
|
protected
void
|
|
protected
void
|
|
protected
void
|
Processes post data.
|
void
|
Registers an action associated with the content being cached.
|
void
|
Register post data loaders for Callback to collect post data.
|
void
|
Registers a control for loading post data in the next postback.
|
void
|
run
( THtmlTextWriter $writer)
Runs through the page lifecycles.
|
protected
void
|
Saves page state from persistent storage.
|
void
|
This method is invoked when control state is to be saved.
|
void
|
Set a new callback client handler.
|
void
|
|
void
|
Registers a control to raise callback event in the current request.
|
void
|
Sets the state to be stored on the client side.
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
Sets input focus on a control after the page is rendered to users.
|
void
|
Registers a TForm instance to the page.
|
void
|
|
void
|
|
void
|
|
void
|
Registers a control to raise postback event in the current request.
|
void
|
|
void
|
Sets the stylesheet theme to be used for the page.
|
void
|
Sets the theme to be used for the page.
|
void
|
Sets the page title.
|
void
|
Performs input validation.
|
Method Details |
applyControlSkin
public void applyControlSkin |
(TControl $control ) |
Applies a skin in the current theme to a control.
This method should only be used by framework developers.
Input |
TControl | $control | a control to be applied skin with |
Output |
Exception |
|
applyControlStyleSheet
public void applyControlStyleSheet |
(TControl $control ) |
Applies a stylesheet skin in the current theme to a control.
This method should only be used by framework developers.
Input |
TControl | $control | a control to be applied stylesheet skin with |
Output |
Exception |
|
beginFormRender
public void beginFormRender |
(mixed $writer ) |
Input |
mixed | $writer | |
Output |
Exception |
|
endFormRender
public void endFormRender |
(mixed $writer ) |
Input |
mixed | $writer | |
Output |
Exception |
|
ensureRenderInForm
public void ensureRenderInForm |
(TControl $control ) |
Ensures the control is rendered within a form.
Input |
TControl | $control | the control to be rendered |
Output |
Exception |
throws | TConfigurationException if the control is outside of the form |
|
getCachingStack
public TStack getCachingStack |
() |
|
getCallbackClient
Gets the callback client script handler that allows javascript functions to be executed during the callback response.
|
getCallbackEventParameter
public string getCallbackEventParameter |
() |
Callback parameter is decoded assuming JSON encoding.
Output |
string
| callback event parameter |
Exception |
|
getCallbackEventTarget
public TControl getCallbackEventTarget |
() |
Output |
TControl
| the control responsible for the current callback event, null if nonexistent |
Exception |
|
getClientScript
|
getClientState
public string getClientState |
() |
Returns the state to be stored on the client side.
This method should only be used by framework and control developers.
Output |
string
| the state to be stored on the client side |
Exception |
|
getClientSupportsJavaScript
public boolean getClientSupportsJavaScript |
() |
Output |
boolean
| whether client supports javascript. Defaults to true. |
Exception |
|
getEnableStateCompression
public boolean getEnableStateCompression |
() |
Output |
boolean
| whether page state should be compressed. Defaults to true. |
Exception |
|
getEnableStateEncryption
public boolean getEnableStateEncryption |
() |
Output |
boolean
| whether page state should be encrypted. Defaults to false. |
Exception |
|
getEnableStateValidation
public boolean getEnableStateValidation |
() |
Output |
boolean
| whether page state should be HMAC validated. Defaults to true. |
Exception |
|
getForm
Output |
TForm
| the form on the page |
Exception |
|
getHead
Output |
THead
| page head, null if not available |
Exception |
|
getIsCallback
public boolean getIsCallback |
() |
Output |
boolean
| whether this is a callback request |
Exception |
|
getIsLoadingPostData
public boolean getIsLoadingPostData |
() |
Output |
boolean
| true if loading post data. |
Exception |
|
getIsPostBack
public boolean getIsPostBack |
() |
Output |
boolean
| whether the current page request is a postback |
Exception |
|
getIsValid
public boolean getIsValid |
() |
Returns whether user input is valid or not.
This method must be invoked after validate is called.
Output |
boolean
| whether the user input is valid or not. |
Exception |
throws | TInvalidOperationException if validate is not invoked yet. |
|
getPagePath
public string getPagePath |
() |
Output |
string
| the requested page path for this page |
Exception |
|
getPostBackEventParameter
public string getPostBackEventParameter |
() |
Output |
string
| postback event parameter |
Exception |
|
getPostBackEventTarget
public TControl getPostBackEventTarget |
() |
Output |
TControl
| the control responsible for the current postback event, null if nonexistent |
Exception |
|
getPostDataLoaders
public array getPostDataLoaders |
() |
Get a list of IDs of controls that are enabled and require post data.
Output |
array
| list of IDs implementing IPostBackDataHandler |
Exception |
|
getRequestClientState
public string getRequestClientState |
() |
Output |
string
| the state postback from client side |
Exception |
|
getStatePersister
|
getStatePersisterClass
public string getStatePersisterClass |
() |
Output |
string
| class name of the page state persister. Defaults to TPageStatePersister. |
Exception |
|
getStyleSheetTheme
public TTheme getStyleSheetTheme |
() |
Output |
TTheme
| the stylesheet theme used for the page. Defaults to null. |
Exception |
|
getTheme
Output |
TTheme
| the theme used for the page. Defaults to null. |
Exception |
|
getTitle
public string getTitle |
() |
Output |
string
| page title. |
Exception |
|
getValidators
public TList getValidators |
(string $validationGroup ) |
Returns a list of registered validators.
If validation group is specified, only the validators in that group will be returned.
Input |
string | $validationGroup | validation group |
Output |
TList
| registered validators in the requested group. If the group is null, all validators will be returned. |
Exception |
|
isSystemPostField
protected boolean isSystemPostField |
(string $field ) |
Input |
string | $field | the field name |
Output |
boolean
| whether the specified field is a system field in postback data |
Exception |
|
loadPageState
protected void loadPageState |
() |
Loads page state from persistent storage.
|
loadState
This method is invoked right after the control has loaded its state.
You can override this method to initialize data from the control state. Parent implementation must be invoked.
|
onInitComplete
public void onInitComplete |
(mixed $param ) |
Raises OnInitComplete event.
This method is invoked right after OnInit stage and before OnLoad stage. You may override this method to provide additional initialization that should be done after OnInit. Remember to call the parent implementation to ensure OnInitComplete event is raised.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
onLoadComplete
public void onLoadComplete |
(mixed $param ) |
Raises OnLoadComplete event.
This method is invoked right after OnLoad stage. You may override this method to provide additional page loading logic that should be done after OnLoad. Remember to call the parent implementation to ensure OnLoadComplete event is raised.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
onPreInit
public void onPreInit |
(mixed $param ) |
Raises OnPreInit event.
This method is invoked right before OnInit stage. You may override this method to provide additional initialization that should be done before OnInit (e.g. setting Theme or StyleSheetTheme). Remember to call the parent implementation to ensure OnPreInit event is raised.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
onPreLoad
public void onPreLoad |
(mixed $param ) |
Raises OnPreLoad event.
This method is invoked right before OnLoad stage. You may override this method to provide additional page loading logic that should be done before OnLoad. Remember to call the parent implementation to ensure OnPreLoad event is raised.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
onPreRenderComplete
public void onPreRenderComplete |
(mixed $param ) |
Raises OnPreRenderComplete event.
This method is invoked right after OnPreRender stage. You may override this method to provide additional preparation for page rendering that should be done after OnPreRender. Remember to call the parent implementation to ensure OnPreRenderComplete event is raised.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
onSaveStateComplete
public void onSaveStateComplete |
(mixed $param ) |
Raises OnSaveStateComplete event.
This method is invoked right after onSaveState stage. You may override this method to provide additional logic after page state is saved. Remember to call the parent implementation to ensure OnSaveStateComplete event is raised.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
processCallbackRequest
protected void processCallbackRequest |
(mixed $writer ) |
Sets Adapter to TActivePageAdapter and calls apter to process the callback request.
Input |
mixed | $writer | |
Output |
Exception |
|
processNormalRequest
protected void processNormalRequest |
(mixed $writer ) |
Input |
mixed | $writer | |
Output |
Exception |
|
processPostBackRequest
protected void processPostBackRequest |
(mixed $writer ) |
Input |
mixed | $writer | |
Output |
Exception |
|
processPostData
protected void processPostData |
(TMap $postData , boolean $beforeLoad ) |
Processes post data.
Input |
TMap | $postData | post data to be processed |
boolean | $beforeLoad | whether this method is invoked before OnLoad. |
Output |
Exception |
|
registerCachingAction
public void registerCachingAction |
(string $context , string $funcName , array $funcParams ) |
Registers an action associated with the content being cached.
The registered action will be replayed if the content stored in the cache is served to end-users.
Input |
string | $context | context of the action method. This is a property-path referring to the context object (e.g. Page, Page.ClientScript). |
string | $funcName | method name of the context object |
array | $funcParams | list of parameters to be passed to the action method |
Output |
Exception |
|
registerPostDataLoader
public void registerPostDataLoader |
(TControl $control ) |
Register post data loaders for Callback to collect post data.
This method should only be called by framework developers.
Input |
TControl | $control | control that requires post data. |
Output |
Exception |
|
registerRequiresPostData
public void registerRequiresPostData |
(TControl $control ) |
Registers a control for loading post data in the next postback.
This method needs to be invoked if the control to load post data may not have a post variable in some cases. For example, a checkbox, if not checked, will not have a post value.
Input |
TControl | $control | control registered for loading post data |
Output |
Exception |
|
run
public void run |
(THtmlTextWriter $writer ) |
Runs through the page lifecycles.
Input |
THtmlTextWriter | $writer | the HTML writer |
Output |
Exception |
|
savePageState
protected void savePageState |
() |
Saves page state from persistent storage.
|
saveState
This method is invoked when control state is to be saved.
You can override this method to do last step state saving. Parent implementation must be invoked.
|
setCallbackClient
Set a new callback client handler.
|
setCallbackEventParameter
public void setCallbackEventParameter |
(mixed $value ) |
Input |
mixed | $value | callback event parameter |
Output |
Exception |
|
setCallbackEventTarget
public void setCallbackEventTarget |
(TControl $control ) |
Registers a control to raise callback event in the current request.
Input |
TControl | $control | control registered to raise callback event. |
Output |
Exception |
|
setClientState
public void setClientState |
(string $state ) |
Sets the state to be stored on the client side.
This method should only be used by framework and control developers.
Input |
string | $state | the state to be stored on the client side |
Output |
Exception |
|
setClientSupportsJavaScript
public void setClientSupportsJavaScript |
(boolean $value ) |
Input |
boolean | $value | whether client supports javascript. If false, javascript will not be generated for controls. |
Output |
Exception |
|
setEnableStateCompression
public void setEnableStateCompression |
(boolean $value ) |
Input |
boolean | $value | whether page state should be compressed. |
Output |
Exception |
|
setEnableStateEncryption
public void setEnableStateEncryption |
(boolean $value ) |
Input |
boolean | $value | whether page state should be encrypted. |
Output |
Exception |
|
setEnableStateValidation
public void setEnableStateValidation |
(boolean $value ) |
Input |
boolean | $value | whether page state should be HMAC validated. |
Output |
Exception |
|
setFocus
public void setFocus |
(TControl|string $value ) |
Sets input focus on a control after the page is rendered to users.
Input |
TControl|string | $value | control to receive focus, or the ID of the element on the page to receive focus |
Output |
Exception |
|
setForm
public void setForm |
(TForm $form ) |
Registers a TForm instance to the page.
Note, a page can contain at most one TForm instance.
Input |
TForm | $form | the form on the page |
Output |
Exception |
throws | TInvalidOperationException if this method is invoked twice or more. |
|
setHead
public void setHead |
(THead $value ) |
Input |
THead | $value | page head |
Output |
Exception |
throws | TInvalidOperationException if a head already exists |
|
setPagePath
public void setPagePath |
(string $value ) |
Input |
string | $value | the requested page path for this page |
Output |
Exception |
|
setPostBackEventParameter
public void setPostBackEventParameter |
(string $value ) |
Input |
string | $value | postback event parameter |
Output |
Exception |
|
setPostBackEventTarget
public void setPostBackEventTarget |
(TControl $control ) |
Registers a control to raise postback event in the current request.
Input |
TControl | $control | control registered to raise postback event. |
Output |
Exception |
|
setStatePersisterClass
public void setStatePersisterClass |
(string $value ) |
Input |
string | $value | class name of the page state persister. |
Output |
Exception |
|
setStyleSheetTheme
public void setStyleSheetTheme |
(string|TTheme $value ) |
Sets the stylesheet theme to be used for the page.
Input |
string|TTheme | $value | the stylesheet theme name or the stylesheet theme object to be used for the page. |
Output |
Exception |
|
setTheme
public void setTheme |
(string|TTheme $value ) |
Sets the theme to be used for the page.
Input |
string|TTheme | $value | the theme name or the theme object to be used for the page. |
Output |
Exception |
|
setTitle
public void setTitle |
(string $value ) |
Sets the page title.
Note, a THead control needs to place on the page in order that this title be rendered.
Input |
string | $value | page title. This will override the title set in Head. |
Output |
Exception |
|
validate
public void validate |
(string $validationGroup ) |
Performs input validation.
This method will invoke the registered validators to perform the actual validation. If validation group is specified, only the validators in that group will be invoked.
Input |
string | $validationGroup | validation group. If null, all validators will perform validation. |
Output |
Exception |
|