Class TPage

Description

TPage class

  • since: 3.0
  • version: $Id: TPage.php 1596 2007-01-04 11:23:26Z wei $
  • 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 ()
string getClientState ()
boolean getIsCallback ()
boolean getIsPostBack ()
boolean getIsValid ()
string getPagePath ()
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 run (THtmlTextWriter $writer)
void savePageState ()
void saveState ()
void setCallbackEventParameter (mixed $value)
void setCallbackEventTarget (TControl $control)
void setClientState (string $state)
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 552)

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

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 919)
  • access: public
void beginFormRender (mixed $writer)
endFormRender (line 931)
  • access: public
void endFormRender (mixed $writer)
ensureRenderInForm (line 910)

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

Constructor.

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

  • access: public
TPage __construct ()

Redefinition of:
TControl::__construct()
Constructor.
getCachingStack (line 1143)
TStack getCachingStack ()
getCallbackClient (line 341)

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

Callback parameter is decoded assuming JSON encoding.

  • return: callback event parameter
  • access: public
string getCallbackEventParameter ()
getCallbackEventTarget (line 362)
  • return: the control responsible for the current callback event, null if nonexistent
  • access: public
TControl getCallbackEventTarget ()
getClientScript (line 572)
  • return: client script manager
  • access: public
TClientScriptManager getClientScript ()
getClientState (line 1020)

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 960)
  • 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 1093)
  • return: whether page state should be encrypted. Defaults to false.
  • access: public
boolean getEnableStateEncryption ()
getEnableStateValidation (line 1077)
  • return: whether page state should be HMAC validated. Defaults to true.
  • access: public
boolean getEnableStateValidation ()
getForm (line 417)
  • return: the form on the page
  • access: public
TForm getForm ()
getHead (line 969)
  • return: page head, null if not available
  • access: public
THead getHead ()
getIsCallback (line 711)
  • return: whether this is a callback request
  • access: public
boolean getIsCallback ()
getIsLoadingPostData (line 880)
  • return: true if loading post data.
  • access: public
boolean getIsLoadingPostData ()
getIsPostBack (line 703)
  • return: whether the current page request is a postback
  • access: public
boolean getIsPostBack ()
getIsValid (line 492)

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 1109)
  • return: the requested page path for this page
  • access: public
string getPagePath ()
getPostBackEventParameter (line 810)
  • return: postback event parameter
  • access: public
string getPostBackEventParameter ()
getPostBackEventTarget (line 787)
  • return: the control responsible for the current postback event, null if nonexistent
  • access: public
TControl getPostBackEventTarget ()
getPostDataLoaders (line 409)

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 1038)
  • return: the state postback from client side
  • access: public
string getRequestClientState ()
getStatePersister (line 1062)
  • return: page state persister
  • access: public
IPageStatePersister getStatePersister ()
getStatePersisterClass (line 1046)
  • return: class name of the page state persister. Defaults to TPageStatePersister.
  • access: public
string getStatePersisterClass ()
getStyleSheetTheme (line 531)
  • return: the stylesheet theme used for the page. Defaults to null.
  • access: public
TTheme getStyleSheetTheme ()
getTheme (line 511)
  • return: the theme used for the page. Defaults to null.
  • access: public
TTheme getTheme ()
getTitle (line 993)
  • return: page title.
  • access: public
string getTitle ()
getValidators (line 442)

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 762)
  • 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 741)

Loads page state from persistent storage.

  • access: protected
void loadPageState ()
loadState (line 732)

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

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

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

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

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

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

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

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

  • access: protected
void processCallbackRequest (mixed $writer)
processNormalRequest (line 192)
  • access: protected
void processNormalRequest (mixed $writer)
processPostBackRequest (line 226)
  • access: protected
void processPostBackRequest (mixed $writer)
processPostData (line 833)

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

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

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

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

Runs through the page lifecycles.

  • access: public
void run (THtmlTextWriter $writer)
  • THtmlTextWriter $writer: the HTML writer
savePageState (line 751)

Saves page state from persistent storage.

  • access: protected
void savePageState ()
saveState (line 721)

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

Set a new callback client handler.

  • access: public
void setCallbackClient (TCallbackClientScript $client)
setCallbackEventParameter (line 388)
  • access: public
void setCallbackEventParameter (mixed $value)
  • mixed $value: callback event parameter
setCallbackEventTarget (line 371)

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

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
setEnableStateEncryption (line 1101)
  • access: public
void setEnableStateEncryption (boolean $value)
  • boolean $value: whether page state should be encrypted.
setEnableStateValidation (line 1085)
  • access: public
void setEnableStateValidation (boolean $value)
  • boolean $value: whether page state should be HMAC validated.
setFocus (line 950)

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

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 978)
  • access: public
  • throws: TInvalidOperationException if a head already exists
void setHead (THead $value)
  • THead $value: page head
setPagePath (line 1117)
  • access: public
void setPagePath (string $value)
  • string $value: the requested page path for this page
setPostBackEventParameter (line 823)
  • access: public
void setPostBackEventParameter (string $value)
  • string $value: postback event parameter
setPostBackEventTarget (line 802)

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 1054)
  • access: public
void setStatePersisterClass (string $value)
  • string $value: class name of the page state persister.
setStyleSheetTheme (line 542)

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

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

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

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::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::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

Documentation generated on Sun, 14 Jan 2007 21:43:39 -0500 by phpDocumentor 1.3.0RC4