## Class TPage

Description

TPage class

- since: 3.0
- version: $Id: TPage.php 2737 2009-11-08 07:33:48Z godzilla80@gmx.net $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/TPage.php (line 29)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TCompositeControl
                |
                --TTemplateControl
                   |
                   --TPage

Class Constant Summary
FIELD_CALLBACK_PARAMETER = 'PRADO_CALLBACK_PARAMETER'
FIELD_CALLBACK_TARGET = 'PRADO_CALLBACK_TARGET'
FIELD_LASTFOCUS = 'PRADO_LASTFOCUS'
FIELD_PAGESTATE = 'PRADO_PAGESTATE'
FIELD_POSTBACK_PARAMETER = 'PRADO_POSTBACK_PARAMETER'
FIELD_POSTBACK_TARGET = 'PRADO_POSTBACK_TARGET'
Method Summary
void applyControlSkin (TControl $control)
void applyControlStyleSheet (TControl $control)
void beginFormRender (mixed $writer)
void endFormRender (mixed $writer)
void ensureRenderInForm (TControl $control)
TPage __construct ()
TStack getCachingStack ()
TCallbackClientScript getCallbackClient ()
string getCallbackEventParameter ()
TControl getCallbackEventTarget ()
TClientScriptManager getClientScript ()
string getClientState ()
boolean getClientSupportsJavaScript ()
boolean getEnableStateCompression ()
boolean getEnableStateEncryption ()
boolean getEnableStateValidation ()
TForm getForm ()
THead getHead ()
boolean getIsCallback ()
boolean getIsLoadingPostData ()
boolean getIsPostBack ()
boolean getIsValid ()
string getPagePath ()
string getPostBackEventParameter ()
TControl getPostBackEventTarget ()
array getPostDataLoaders ()
string getRequestClientState ()
IPageStatePersister getStatePersister ()
string getStatePersisterClass ()
TTheme getStyleSheetTheme ()
TTheme getTheme ()
string getTitle ()
TList getValidators ([string $validationGroup = null])
boolean isSystemPostField (string $field)
void loadPageState ()
void loadState ()
void onInitComplete (mixed $param)
void onLoadComplete (mixed $param)
void onPreInit (mixed $param)
void onPreLoad (mixed $param)
void onPreRenderComplete (mixed $param)
void onSaveStateComplete (mixed $param)
void processCallbackRequest (mixed $writer)
void processNormalRequest (mixed $writer)
void processPostBackRequest (mixed $writer)
void processPostData (TMap $postData, boolean $beforeLoad)
void registerCachingAction (string $context, string $funcName, array $funcParams)
void registerPostDataLoader (TControl $control)
void registerRequiresPostData (TControl $control)
void run (THtmlTextWriter $writer)
void savePageState ()
void saveState ()
void setCallbackClient (TCallbackClientScript $client)
void setCallbackEventParameter (mixed $value)
void setCallbackEventTarget (TControl $control)
void setClientState (string $state)
void setClientSupportsJavaScript (boolean $value)
void setEnableStateCompression (boolean $value)
void setEnableStateEncryption (boolean $value)
void setEnableStateValidation (boolean $value)
void setFocus (TControl|string $value)
void setForm (TForm $form)
void setHead (THead $value)
void setPagePath (string $value)
void setPostBackEventParameter (string $value)
void setPostBackEventTarget (TControl $control)
void setStatePersisterClass (string $value)
void setStyleSheetTheme (string|TTheme $value)
void setTheme (string|TTheme $value)
void setTitle (string $value)
void validate ([string $validationGroup = null])
Methods
applyControlSkin (line 567)

Applies a skin in the current theme to a control.

This method should only be used by framework developers.

- access: public

void applyControlSkin (TControl $control)

- TControl $control: a control to be applied skin with

applyControlStyleSheet (line 578)

Applies a stylesheet skin in the current theme to a control.

This method should only be used by framework developers.

- access: public

void applyControlStyleSheet (TControl $control)

- TControl $control: a control to be applied stylesheet skin with

beginFormRender (line 948)

- access: public

void beginFormRender (mixed $writer)
endFormRender (line 960)

- access: public

void endFormRender (mixed $writer)
ensureRenderInForm (line 939)

Ensures the control is rendered within a form.

- access: public
- throws: TConfigurationException if the control is outside of the form

void ensureRenderInForm (TControl $control)

- TControl $control: the control to be rendered

Constructor __construct (line 175)

Constructor.

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

- access: public

TPage __construct ()

Redefinition of:

TControl::__construct()
  Constructor.

getCachingStack (line 1195)

- return: stack of TOutputCache objects
- access: public

TStack getCachingStack ()
getCallbackClient (line 356)

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

- return: interface to client-side javascript code.
- access: public

TCallbackClientScript getCallbackClient ()
getCallbackEventParameter (line 395)

Callback parameter is decoded assuming JSON encoding.

- return: callback event parameter
- access: public

string getCallbackEventParameter ()
getCallbackEventTarget (line 377)

- return: the control responsible for the current callback event, null if nonexistent
- access: public

TControl getCallbackEventTarget ()
getClientScript (line 587)

- return: client script manager
- access: public

TClientScriptManager getClientScript ()
getClientState (line 1054)

Returns the state to be stored on the client side.

This method should only be used by framework and control developers.

- return: the state to be stored on the client side
- access: public

string getClientState ()
getClientSupportsJavaScript (line 987)

- return: whether client supports javascript. Defaults to true.
- access: public

boolean getClientSupportsJavaScript ()
getEnableStateCompression (line 1144)

- return: whether page state should be compressed. Defaults to true.
- access: public
- since: 3.1.6

boolean getEnableStateCompression ()
getEnableStateEncryption (line 1127)

- return: whether page state should be encrypted. Defaults to false.
- access: public

boolean getEnableStateEncryption ()
getEnableStateValidation (line 1111)

- return: whether page state should be HMAC validated. Defaults to true.
- access: public

boolean getEnableStateValidation ()
getForm (line 432)

- return: the form on the page
- access: public

TForm getForm ()
getHead (line 1003)

- return: page head, null if not available
- access: public

THead getHead ()
getIsCallback (line 740)

- return: whether this is a callback request
- access: public

boolean getIsCallback ()
getIsLoadingPostData (line 909)

- return: true if loading post data.
- access: public

boolean getIsLoadingPostData ()
getIsPostBack (line 732)

- return: whether the current page request is a postback
- access: public

boolean getIsPostBack ()
getIsValid (line 507)

Returns whether user input is valid or not.

This method must be invoked after validate is called.

- return: whether the user input is valid or not.
- access: public
- throws: TInvalidOperationException if validate is not invoked yet.

boolean getIsValid ()
getPagePath (line 1161)

- return: the requested page path for this page
- access: public

string getPagePath ()
getPostBackEventParameter (line 839)

- return: postback event parameter
- access: public

string getPostBackEventParameter ()
getPostBackEventTarget (line 816)

- return: the control responsible for the current postback event, null if nonexistent
- access: public

TControl getPostBackEventTarget ()
getPostDataLoaders (line 424)

Get a list of IDs of controls that are enabled and require post data.

- return: list of IDs implementing IPostBackDataHandler
- access: public

array getPostDataLoaders ()
getRequestClientState (line 1072)

- return: the state postback from client side
- access: public

string getRequestClientState ()
getStatePersister (line 1096)

- return: page state persister
- access: public

IPageStatePersister getStatePersister ()
getStatePersisterClass (line 1080)

- return: class name of the page state persister. Defaults to TPageStatePersister.
- access: public

string getStatePersisterClass ()
getStyleSheetTheme (line 546)

- return: the stylesheet theme used for the page. Defaults to null.
- access: public

TTheme getStyleSheetTheme ()
getTheme (line 526)

- return: the theme used for the page. Defaults to null.
- access: public

TTheme getTheme ()
getTitle (line 1027)

- return: page title.
- access: public

string getTitle ()
getValidators (line 457)

Returns a list of registered validators.

If validation group is specified, only the validators in that group will be returned.

- return: registered validators in the requested group. If the group is null, all validators will be returned.
- access: public

TList getValidators ([string $validationGroup = null])

- string $validationGroup: validation group

isSystemPostField (line 791)

- return: whether the specified field is a system field in postback data
- access: protected

boolean isSystemPostField (string $field)

- string $field: the field name

loadPageState (line 770)

Loads page state from persistent storage.

- access: protected

void loadPageState ()
loadState (line 761)

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.

- access: public

void loadState ()

Redefinition of:

TControl::loadState()
  This method is invoked right after the control has loaded its state.

onInitComplete (line 625)

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.

- access: public

void onInitComplete (mixed $param)

- mixed $param: event parameter

onLoadComplete (line 651)

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.

- access: public

void onLoadComplete (mixed $param)

- mixed $param: event parameter

onPreInit (line 612)

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.

- access: public

void onPreInit (mixed $param)

- mixed $param: event parameter

onPreLoad (line 638)

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.

- access: public

void onPreLoad (mixed $param)

- mixed $param: event parameter

onPreRenderComplete (line 664)

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.

- access: public

void onPreRenderComplete (mixed $param)

- mixed $param: event parameter

onSaveStateComplete (line 713)

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.

- access: public

void onSaveStateComplete (mixed $param)

- mixed $param: event parameter

processCallbackRequest (line 284)

Sets Adapter to TActivePageAdapter and calls apter to process the callback request.

- access: protected

void processCallbackRequest (mixed $writer)
processNormalRequest (line 201)

- access: protected

void processNormalRequest (mixed $writer)
processPostBackRequest (line 235)

- access: protected

void processPostBackRequest (mixed $writer)
processPostData (line 862)

Processes post data.

- access: protected

void processPostData (TMap $postData, boolean $beforeLoad)

- TMap $postData: post data to be processed
- boolean $beforeLoad: whether this method is invoked before OnLoad.

registerCachingAction (line 1183)

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.

- access: public

void registerCachingAction (string $context, string $funcName, array $funcParams)

- 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

registerPostDataLoader (line 414)

Register post data loaders for Callback to collect post data.

This method should only be called by framework developers.

- access: public
- see: TControl::preRenderRecursive();

void registerPostDataLoader (TControl $control)

- TControl $control: control that requires post data.

registerRequiresPostData (line 803)

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.

- access: public

void registerRequiresPostData (TControl $control)

- TControl $control: control registered for loading post data

run (line 185)

Runs through the page lifecycles.

- access: public

void run (THtmlTextWriter $writer)

- THtmlTextWriter $writer: the HTML writer

savePageState (line 780)

Saves page state from persistent storage.

- access: protected

void savePageState ()
saveState (line 750)

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.

- access: public

void saveState ()

Redefinition of:

TControl::saveState()
  This method is invoked when control state is to be saved.

setCallbackClient (line 368)

Set a new callback client handler.

- access: public

void setCallbackClient (TCallbackClientScript $client)

- TCallbackClientScript $client: new callback client script handler.

setCallbackEventParameter (line 403)

- access: public

void setCallbackEventParameter (mixed $value)

- mixed $value: callback event parameter

setCallbackEventTarget (line 386)

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

- access: public

void setCallbackEventTarget (TControl $control)

- TControl $control: control registered to raise callback event.

setClientState (line 1064)

Sets the state to be stored on the client side.

This method should only be used by framework and control developers.

- access: public

void setClientState (string $state)

- string $state: the state to be stored on the client side

setClientSupportsJavaScript (line 995)

- access: public

void setClientSupportsJavaScript (boolean $value)

- boolean $value: whether client supports javascript. If false, javascript will not be generated for controls.

setEnableStateCompression (line 1153)

- access: public
- since: 3.1.6

void setEnableStateCompression (boolean $value)

- boolean $value: whether page state should be compressed.

setEnableStateEncryption (line 1135)

- access: public

void setEnableStateEncryption (boolean $value)

- boolean $value: whether page state should be encrypted.

setEnableStateValidation (line 1119)

- access: public

void setEnableStateValidation (boolean $value)

- boolean $value: whether page state should be HMAC validated.

setFocus (line 979)

Sets input focus on a control after the page is rendered to users.

- access: public

void setFocus (TControl|string $value)

- TControl|string $value: control to receive focus, or the ID of the element on the page to receive focus

setForm (line 443)

Registers a TForm instance to the page.

Note, a page can contain at most one TForm instance.

- access: public
- throws: TInvalidOperationException if this method is invoked twice or more.

void setForm (TForm $form)

- TForm $form: the form on the page

setHead (line 1012)

- access: public
- throws: TInvalidOperationException if a head already exists

void setHead (THead $value)

- THead $value: page head

setPagePath (line 1169)

- access: public

void setPagePath (string $value)

- string $value: the requested page path for this page

setPostBackEventParameter (line 852)

- access: public

void setPostBackEventParameter (string $value)

- string $value: postback event parameter

setPostBackEventTarget (line 831)

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

- access: public

void setPostBackEventTarget (TControl $control)

- TControl $control: control registered to raise postback event.

setStatePersisterClass (line 1088)

- access: public

void setStatePersisterClass (string $value)

- string $value: class name of the page state persister.

setStyleSheetTheme (line 557)

Sets the stylesheet theme to be used for the page.

- access: public

void setStyleSheetTheme (string|TTheme $value)

- string|TTheme $value: the stylesheet theme name or the stylesheet theme object to be used for the page.

setTheme (line 537)

Sets the theme to be used for the page.

- access: public

void setTheme (string|TTheme $value)

- string|TTheme $value: the theme name or the theme object to be used for the page.

setTitle (line 1041)

Sets the page title.

Note, a THead control needs to place on the page in order that this title be rendered.

- access: public

void setTitle (string $value)

- string $value: page title. This will override the title set in Head.

validate (line 479)

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.

- access: public

void validate ([string $validationGroup = null])

- string $validationGroup: validation group. If null, all validators will perform validation.

#### Inherited 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()

Inherited From TCompositeControl

> TCompositeControl::initRecursive()

Inherited From TControl

> TControl::__construct()
> 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()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

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()

Class Constants
FIELD_CALLBACK_PARAMETER = 'PRADO_CALLBACK_PARAMETER' (line 39)
FIELD_CALLBACK_TARGET = 'PRADO_CALLBACK_TARGET' (line 38)
FIELD_LASTFOCUS = 'PRADO_LASTFOCUS' (line 36)
FIELD_PAGESTATE = 'PRADO_PAGESTATE' (line 37)
FIELD_POSTBACK_PARAMETER = 'PRADO_POSTBACK_PARAMETER' (line 35)
FIELD_POSTBACK_TARGET = 'PRADO_POSTBACK_TARGET' (line 34)

system post fields

#### Inherited Constants

Inherited from TTemplateControl

> TTemplateControl::EXT_TEMPLATE

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Mon, 22 Feb 2010 12:18:17 +0000 by phpDocumentor 1.3.0RC4