## Class TPage

Description

TPage class

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

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

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

Class Constant Summary
FIELD_CALLBACK_ID = 'PRADO_CALLBACK_ID'
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
TPage __construct ()
void applyControlSkin (TControl $control)
void applyControlStyleSheet (TControl $control)
void beginFormRender (mixed $writer)
void endFormRender (mixed $writer)
void ensureRenderInForm (TControl $control)
TClientScriptManager getClientScript ()
boolean getClientSupportsJavaScript ()
boolean getEnableStateEncryption ()
boolean getEnableStateValidation ()
TForm getForm ()
THead getHead ()
boolean getIsCallback ()
boolean getIsPostBack ()
boolean getIsValid ()
string getPagePath ()
string getPostBackEventParameter ()
TControl getPostBackEventTarget ()
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 registerRequiresPostData (TControl $control)
void run (THtmlTextWriter $writer)
void savePageState ()
void saveState ()
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
Constructor __construct (line 149)

Constructor.

Sets the page object to itself.

- access: public

TPage __construct ()

Redefinition of:

TControl::__construct()
  Constructor.

applyControlSkin (line 396)

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

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

- access: public

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

- access: public

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

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

getClientScript (line 416)

- return: client script manager
- access: public

TClientScriptManager getClientScript ()
getClientSupportsJavaScript (line 778)

- return: whether client supports javascript. Currently, this method always returns true. If future, we may add some browser capability detection functionality.
- access: public

boolean getClientSupportsJavaScript ()
getEnableStateEncryption (line 883)

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

boolean getEnableStateEncryption ()
getEnableStateValidation (line 867)

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

boolean getEnableStateValidation ()
getForm (line 261)

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

TForm getForm ()
getHead (line 787)

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

THead getHead ()
getIsCallback (line 539)

TBD

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

boolean getIsCallback ()
getIsPostBack (line 530)

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

boolean getIsPostBack ()
getIsValid (line 336)

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

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

string getPagePath ()
getPostBackEventParameter (line 633)

- return: postback event parameter
- access: public

string getPostBackEventParameter ()
getPostBackEventTarget (line 610)

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

TControl getPostBackEventTarget ()
getStatePersister (line 852)

- return: page state persister
- access: public

IPageStatePersister getStatePersister ()
getStatePersisterClass (line 836)

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

string getStatePersisterClass ()
getStyleSheetTheme (line 375)

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

TTheme getStyleSheetTheme ()
getTheme (line 355)

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

TTheme getTheme ()
getTitle (line 811)

- return: page title.
- access: public

string getTitle ()
getValidators (line 286)

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

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

Loads page state from persistent storage.

- access: protected

void loadPageState ()
loadState (line 560)

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

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

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

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

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

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

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

- access: protected

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

- access: protected

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

- access: protected

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

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.

registerRequiresPostData (line 602)

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

Runs through the page lifecycles.

- access: public

void run (THtmlTextWriter $writer)

- THtmlTextWriter $writer: the HTML writer

savePageState (line 579)

Saves page state from persistent storage.

- access: protected

void savePageState ()
saveState (line 549)

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.

setEnableStateEncryption (line 891)

- access: public

void setEnableStateEncryption (boolean $value)

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

setEnableStateValidation (line 875)

- access: public

void setEnableStateValidation (boolean $value)

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

setFocus (line 768)

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

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

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

void setHead (THead $value)

- THead $value: page head

setPagePath (line 907)

- access: public

void setPagePath (string $value)

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

setPostBackEventParameter (line 646)

- access: public

void setPostBackEventParameter (string $value)

- string $value: postback event parameter

setPostBackEventTarget (line 625)

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

- access: public

void setStatePersisterClass (string $value)

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

setStyleSheetTheme (line 386)

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

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

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

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 TControl

> TControl::__construct()
> TControl::addedControl()
> TControl::addParsedObject()
> TControl::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::broadcastEventInternal()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::createdOnTemplate()
> 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::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasControls()
> 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::onBubbleEvent()
> 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::setEnabled()
> TControl::setEnableTheming()
> TControl::setEnableViewState()
> TControl::setID()
> TControl::setPage()
> TControl::setSkinID()
> TControl::setTemplateControl()
> TControl::setViewState()
> TControl::setVisible()
> 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::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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_ID = 'PRADO_CALLBACK_ID' (line 39)
FIELD_CALLBACK_PARAMETER = 'PRADO_CALLBACK_PARAMETER' (line 38)
FIELD_CALLBACK_TARGET = 'PRADO_CALLBACK_TARGET' (line 37)
FIELD_LASTFOCUS = 'PRADO_LASTFOCUS' (line 35)
FIELD_PAGESTATE = 'PRADO_PAGESTATE' (line 36)
FIELD_POSTBACK_PARAMETER = 'PRADO_POSTBACK_PARAMETER' (line 34)
FIELD_POSTBACK_TARGET = 'PRADO_POSTBACK_TARGET' (line 33)

system post fields

#### Inherited Constants

Inherited from TTemplateControl

Inherited from TControl

Documentation generated on Mon, 01 May 2006 23:04:12 -0400 by phpDocumentor 1.3.0RC4