Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TPage

TPage class

Since: 3.0
Author: Qiang Xue <qiang.xue@gmail.com>
Constants Inherited From TTemplateControl
EXT_TEMPLATE,
Constants Inherited From TControl
AUTOMATIC_ID_PREFIX, CLIENT_ID_SEPARATOR, CS_CHILD_INITIALIZED, CS_CONSTRUCTED, CS_INITIALIZED, CS_LOADED, CS_PRERENDERED, CS_STATE_LOADED, ID_FORMAT, ID_SEPARATOR, IS_CHILD_CREATED, IS_CREATING_CHILD, IS_DISABLE_THEMING, IS_DISABLE_VIEWSTATE, IS_ID_SET, IS_SKIN_APPLIED, IS_STYLESHEET_APPLIED, RF_ADAPTER, RF_AUTO_BINDINGS, RF_CHILD_STATE, RF_CONTROLS, RF_CONTROLSTATE, RF_DATA_BINDINGS, RF_EVENTS, RF_NAMED_CONTROLS, RF_NAMED_CONTROLS_ID, RF_NAMED_OBJECTS, RF_SKIN_ID,

Constructor Summary
public
Constructor.

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
beginFormRender ( mixed $writer)
void
endFormRender ( mixed $writer)
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
getForm ()
THead
getHead ()
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
getValidators ( string $validationGroup)
Returns a list of registered validators.
protected  boolean
isSystemPostField ( string $field)
protected  void
Loads page state from persistent storage.
void
This method is invoked right after the control has loaded its state.
void
onInitComplete ( mixed $param)
Raises OnInitComplete event.
void
onLoadComplete ( mixed $param)
Raises OnLoadComplete event.
void
onPreInit ( mixed $param)
Raises OnPreInit event.
void
onPreLoad ( mixed $param)
Raises OnPreLoad event.
void
onPreRenderComplete ( mixed $param)
Raises OnPreRenderComplete event.
void
onSaveStateComplete ( mixed $param)
Raises OnSaveStateComplete event.
protected  void
processCallbackRequest ( mixed $writer)
Sets Adapter to TActivePageAdapter and calls apter to process the callback request.
protected  void
processNormalRequest ( mixed $writer)
protected  void
processPostBackRequest ( mixed $writer)
protected  void
processPostData ( TMap $postData, boolean $beforeLoad)
Processes post data.
void
registerCachingAction ( string $context, string $funcName, array $funcParams)
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
setCallbackEventParameter ( mixed $value)
void
setCallbackEventTarget ( TControl $control)
Registers a control to raise callback event in the current request.
void
setClientState ( string $state)
Sets the state to be stored on the client side.
void
setClientSupportsJavaScript ( boolean $value)
void
setEnableStateCompression ( boolean $value)
void
setEnableStateEncryption ( boolean $value)
void
setEnableStateValidation ( boolean $value)
void
setFocus ( TControl|string $value)
Sets input focus on a control after the page is rendered to users.
void
setForm ( TForm $form)
Registers a TForm instance to the page.
void
setHead ( THead $value)
void
setPagePath ( string $value)
void
setPostBackEventParameter ( string $value)
void
setPostBackEventTarget ( TControl $control)
Registers a control to raise postback event in the current request.
void
setStatePersisterClass ( string $value)
void
setStyleSheetTheme ( string|TTheme $value)
Sets the stylesheet theme to be used for the page.
void
setTheme ( string|TTheme $value)
Sets the theme to be used for the page.
void
setTitle ( string $value)
Sets the page title.
void
validate ( string $validationGroup)
Performs input validation.
Methods Inherited From TTemplateControl
TTemplateControl::createChildControls(), TTemplateControl::getIsSourceTemplateControl(), TTemplateControl::getMaster(), TTemplateControl::getMasterClass(), TTemplateControl::getTemplate(), TTemplateControl::getTemplateDirectory(), TTemplateControl::initRecursive(), TTemplateControl::injectContent(), TTemplateControl::loadTemplate(), TTemplateControl::registerContent(), TTemplateControl::registerContentPlaceHolder(), TTemplateControl::setMasterClass(), TTemplateControl::setTemplate()
Methods Inherited From TCompositeControl
TCompositeControl::initRecursive()
Methods Inherited From TControl
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Constant Summary
string FIELD_CALLBACK_PARAMETER
string FIELD_CALLBACK_TARGET
string FIELD_LASTFOCUS
string FIELD_PAGESTATE
string FIELD_POSTBACK_PARAMETER
string FIELD_POSTBACK_TARGET system post fields

Constructor Details

__construct

public __construct

Constructor.

Sets the page object to itself. Derived classes must call parent implementation.


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$controla 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$controla 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$controlthe control to be rendered
Output
Exception
throwsTConfigurationException if the control is outside of the form

getCachingStack

public TStack getCachingStack ()

Output
TStack stack of TOutputCache objects
Exception

getCallbackClient

public TCallbackClientScript getCallbackClient ()

Gets the callback client script handler that allows javascript functions to be executed during the callback response.

Output
TCallbackClientScript interface to client-side javascript code.
Exception

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

public TClientScriptManager getClientScript ()

Output
TClientScriptManager client script manager
Exception

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

public TForm getForm ()

Output
TForm the form on the page
Exception

getHead

public THead 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
throwsTInvalidOperationException 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

public IPageStatePersister getStatePersister ()

Output
IPageStatePersister page state persister
Exception

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

public TTheme 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$validationGroupvalidation 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$fieldthe 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.

Output
Exception

loadState

public void 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.

Output
Exception

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$paramevent 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$paramevent 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$paramevent 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$paramevent 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$paramevent 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$paramevent 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$postDatapost data to be processed
boolean$beforeLoadwhether 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$contextcontext of the action method. This is a property-path referring to the context object (e.g. Page, Page.ClientScript).
string$funcNamemethod name of the context object
array$funcParamslist 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$controlcontrol 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$controlcontrol registered for loading post data
Output
Exception

run

public void run (THtmlTextWriter $writer )

Runs through the page lifecycles.

Input
THtmlTextWriter$writerthe HTML writer
Output
Exception

savePageState

protected void savePageState ()

Saves page state from persistent storage.

Output
Exception

saveState

public void 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.

Output
Exception

setCallbackClient

public void setCallbackClient (TCallbackClientScript $client )

Set a new callback client handler.

Input
TCallbackClientScript$clientnew callback client script handler.
Output
Exception

setCallbackEventParameter

public void setCallbackEventParameter (mixed $value )

Input
mixed$valuecallback event parameter
Output
Exception

setCallbackEventTarget

public void setCallbackEventTarget (TControl $control )

Registers a control to raise callback event in the current request.

Input
TControl$controlcontrol 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$statethe state to be stored on the client side
Output
Exception

setClientSupportsJavaScript

public void setClientSupportsJavaScript (boolean $value )

Input
boolean$valuewhether client supports javascript. If false, javascript will not be generated for controls.
Output
Exception

setEnableStateCompression

public void setEnableStateCompression (boolean $value )

Input
boolean$valuewhether page state should be compressed.
Output
Exception

setEnableStateEncryption

public void setEnableStateEncryption (boolean $value )

Input
boolean$valuewhether page state should be encrypted.
Output
Exception

setEnableStateValidation

public void setEnableStateValidation (boolean $value )

Input
boolean$valuewhether 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$valuecontrol 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$formthe form on the page
Output
Exception
throwsTInvalidOperationException if this method is invoked twice or more.

setHead

public void setHead (THead $value )

Input
THead$valuepage head
Output
Exception
throwsTInvalidOperationException if a head already exists

setPagePath

public void setPagePath (string $value )

Input
string$valuethe requested page path for this page
Output
Exception

setPostBackEventParameter

public void setPostBackEventParameter (string $value )

Input
string$valuepostback event parameter
Output
Exception

setPostBackEventTarget

public void setPostBackEventTarget (TControl $control )

Registers a control to raise postback event in the current request.

Input
TControl$controlcontrol registered to raise postback event.
Output
Exception

setStatePersisterClass

public void setStatePersisterClass (string $value )

Input
string$valueclass 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$valuethe 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$valuethe 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$valuepage 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$validationGroupvalidation group. If null, all validators will perform validation.
Output
Exception


Constant Details

FIELD_CALLBACK_PARAMETER

Type:

string

Value:

'PRADO_CALLBACK_PARAMETER'

FIELD_CALLBACK_TARGET

Type:

string

Value:

'PRADO_CALLBACK_TARGET'

FIELD_LASTFOCUS

Type:

string

Value:

'PRADO_LASTFOCUS'

FIELD_PAGESTATE

Type:

string

Value:

'PRADO_PAGESTATE'

FIELD_POSTBACK_PARAMETER

Type:

string

Value:

'PRADO_POSTBACK_PARAMETER'

FIELD_POSTBACK_TARGET

system post fields

Type:

string

Value:

'PRADO_POSTBACK_TARGET'