PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TPage

TPage class

TComponent
Extended by TApplicationComponent
Extended by TControl implements IRenderable, IBindable
Extended by TCompositeControl implements INamingContainer
Extended by TTemplateControl
Extended by TPage

Direct known subclasses

TWsatGenerateAR, TWsatHome, TWsatLogin, TWsatScaffolding
Package: System\Web\UI
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/TPage.php
Methods summary
public
# __construct( )

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

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

Overrides

TControl::__construct()
public
# run( THtmlTextWriter $writer )

Runs through the page lifecycles.

Runs through the page lifecycles.

Parameters

$writer
THtmlTextWriter
the HTML writer
protected
# processNormalRequest( mixed $writer )
protected
# processPostBackRequest( mixed $writer )
protected static
# decodeUTF8( mixed $data, mixed $enc )
protected
# processCallbackRequest( mixed $writer )

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

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

public TCallbackClientScript
# getCallbackClient( )

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

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

Returns

TCallbackClientScript
interface to client-side javascript code.
public
# setCallbackClient( TCallbackClientScript $client )

Set a new callback client handler.

Set a new callback client handler.

Parameters

$client
TCallbackClientScript
new callback client script handler.
public TControl
# getCallbackEventTarget( )

Returns

TControl
the control responsible for the current callback event, null if nonexistent
public
# setCallbackEventTarget( TControl $control )

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

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

Parameters

$control
TControl
control registered to raise callback event.
public string
# getCallbackEventParameter( )

Callback parameter is decoded assuming JSON encoding.

Callback parameter is decoded assuming JSON encoding.

Returns

string
callback event parameter
public
# setCallbackEventParameter( mixed $value )

Parameters

$value
mixed
callback event parameter
public
# registerPostDataLoader( TControl $control )

Register post data loaders for Callback to collect post data. This method should only be called by framework developers.

Register post data loaders for Callback to collect post data. This method should only be called by framework developers.

Parameters

$control
TControl
control that requires post data.

See

TControl::preRenderRecursive();
public array
# getPostDataLoaders( )

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

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

Returns

array
list of IDs implementing IPostBackDataHandler
public TForm
# getForm( )

Returns

TForm
the form on the page
public
# setForm( TForm $form )

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

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

Parameters

$form
TForm
the form on the page

Throws

TInvalidOperationException
if this method is invoked twice or more.
public TList
# getValidators( string $validationGroup = null )

Returns a list of registered validators. If validation group is specified, only the validators in that group will be returned.

Returns a list of registered validators. If validation group is specified, only the validators in that group will be returned.

Parameters

$validationGroup
string
validation group

Returns

TList
registered validators in the requested group. If the group is null, all validators will be returned.
public
# validate( string $validationGroup = null )

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.

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.

Parameters

$validationGroup
string
validation group. If null, all validators will perform validation.
public boolean
# getIsValid( )

Returns whether user input is valid or not. This method must be invoked after TPage::validate() is called.

Returns whether user input is valid or not. This method must be invoked after TPage::validate() is called.

Returns

boolean
whether the user input is valid or not.

Throws

TInvalidOperationException
if TPage::validate() is not invoked yet.
public TTheme
# getTheme( )

Returns

TTheme
the theme used for the page. Defaults to null.
public
# setTheme( string|TTheme $value )

Sets the theme to be used for the page.

Sets the theme to be used for the page.

Parameters

$value
string|TTheme
the theme name or the theme object to be used for the page.
public TTheme
# getStyleSheetTheme( )

Returns

TTheme
the stylesheet theme used for the page. Defaults to null.
public
# setStyleSheetTheme( string|TTheme $value )

Sets the stylesheet theme to be used for the page.

Sets the stylesheet theme to be used for the page.

Parameters

$value
string|TTheme
the stylesheet theme name or the stylesheet theme object to be used for the page.
public
# applyControlSkin( TControl $control )

Applies a skin in the current theme to a control. This method should only be used by framework developers.

Applies a skin in the current theme to a control. This method should only be used by framework developers.

Parameters

$control
TControl
a control to be applied skin with
public
# applyControlStyleSheet( TControl $control )

Applies a stylesheet skin in the current theme to a control. This method should only be used by framework developers.

Applies a stylesheet skin in the current theme to a control. This method should only be used by framework developers.

Parameters

$control
TControl
a control to be applied stylesheet skin with
public TClientScriptManager
# getClientScript( )

Returns

TClientScriptManager
client script manager
public
# onPreInit( mixed $param )

Raises OnPreInit event. This method is invoked right before onInit OnInit stage. You may override this method to provide additional initialization that should be done before onInit OnInit (e.g. setting setTheme Theme or setStyleSheetTheme StyleSheetTheme). Remember to call the parent implementation to ensure OnPreInit event is raised.

Raises OnPreInit event. This method is invoked right before onInit OnInit stage. You may override this method to provide additional initialization that should be done before onInit OnInit (e.g. setting setTheme Theme or setStyleSheetTheme StyleSheetTheme). Remember to call the parent implementation to ensure OnPreInit event is raised.

Parameters

$param
mixed
event parameter
public
# onInitComplete( mixed $param )

Raises OnInitComplete event. This method is invoked right after onInit OnInit stage and before onLoad OnLoad stage. You may override this method to provide additional initialization that should be done after onInit OnInit. Remember to call the parent implementation to ensure OnInitComplete event is raised.

Raises OnInitComplete event. This method is invoked right after onInit OnInit stage and before onLoad OnLoad stage. You may override this method to provide additional initialization that should be done after onInit OnInit. Remember to call the parent implementation to ensure OnInitComplete event is raised.

Parameters

$param
mixed
event parameter
public
# onPreLoad( mixed $param )

Raises OnPreLoad event. This method is invoked right before onLoad OnLoad stage. You may override this method to provide additional page loading logic that should be done before onLoad OnLoad. Remember to call the parent implementation to ensure OnPreLoad event is raised.

Raises OnPreLoad event. This method is invoked right before onLoad OnLoad stage. You may override this method to provide additional page loading logic that should be done before onLoad OnLoad. Remember to call the parent implementation to ensure OnPreLoad event is raised.

Parameters

$param
mixed
event parameter
public
# onLoadComplete( mixed $param )

Raises OnLoadComplete event. This method is invoked right after onLoad OnLoad stage. You may override this method to provide additional page loading logic that should be done after onLoad OnLoad. Remember to call the parent implementation to ensure OnLoadComplete event is raised.

Raises OnLoadComplete event. This method is invoked right after onLoad OnLoad stage. You may override this method to provide additional page loading logic that should be done after onLoad OnLoad. Remember to call the parent implementation to ensure OnLoadComplete event is raised.

Parameters

$param
mixed
event parameter
public
# onPreRenderComplete( mixed $param )

Raises OnPreRenderComplete event. This method is invoked right after onPreRender OnPreRender stage. You may override this method to provide additional preparation for page rendering that should be done after onPreRender OnPreRender. Remember to call the parent implementation to ensure OnPreRenderComplete event is raised.

Raises OnPreRenderComplete event. This method is invoked right after onPreRender OnPreRender stage. You may override this method to provide additional preparation for page rendering that should be done after onPreRender OnPreRender. Remember to call the parent implementation to ensure OnPreRenderComplete event is raised.

Parameters

$param
mixed
event parameter
public
# onSaveStateComplete( mixed $param )

Raises OnSaveStateComplete event. This method is invoked right after onSaveState 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.

Raises OnSaveStateComplete event. This method is invoked right after onSaveState 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.

Parameters

$param
mixed
event parameter
public boolean
# getIsPostBack( )

Returns

boolean
whether the current page request is a postback
public boolean
# getIsCallback( )

Returns

boolean
whether this is a callback request
public
# 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.

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.

Overrides

TControl::saveState()
public
# 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.

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.

Overrides

TControl::loadState()
protected
# loadPageState( )

Loads page state from persistent storage.

Loads page state from persistent storage.

protected
# savePageState( )

Saves page state from persistent storage.

Saves page state from persistent storage.

protected boolean
# isSystemPostField( string $field )

Parameters

$field
string
the field name

Returns

boolean
whether the specified field is a system field in postback data
public
# 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.

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.

Parameters

$control
TControl
control registered for loading post data
public TControl
# getPostBackEventTarget( )

Returns

TControl
the control responsible for the current postback event, null if nonexistent
public
# setPostBackEventTarget( TControl $control )

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

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

Parameters

$control
TControl
control registered to raise postback event.
public string
# getPostBackEventParameter( )

Returns

string
postback event parameter
public
# setPostBackEventParameter( string $value )

Parameters

$value
string
postback event parameter
protected
# processPostData( TMap $postData, boolean $beforeLoad )

Processes post data.

Processes post data.

Parameters

$postData
TMap
post data to be processed
$beforeLoad
boolean
whether this method is invoked before onLoad OnLoad.
public boolean
# getIsLoadingPostData( )

Returns

boolean
true if loading post data.
protected
# raiseChangedEvents( )

Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback.

Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback.

protected
# raisePostBackEvent( )

Raises PostBack event.

Raises PostBack event.

public boolean
# getInFormRender( )

Returns

boolean
Whether form rendering is in progress
public
# ensureRenderInForm( TControl $control )

Ensures the control is rendered within a form.

Ensures the control is rendered within a form.

Parameters

$control
TControl
the control to be rendered

Throws

TConfigurationException
if the control is outside of the form
public
# beginFormRender( mixed $writer )
public
# endFormRender( mixed $writer )
public
# setFocus( TControl|string $value )

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

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

Parameters

$value
TControl|string
control to receive focus, or the ID of the element on the page to receive focus
public boolean
# getClientSupportsJavaScript( )

Returns

boolean
whether client supports javascript. Defaults to true.
public
# setClientSupportsJavaScript( boolean $value )

Parameters

$value
boolean
whether client supports javascript. If false, javascript will not be generated for controls.
public THead
# getHead( )

Returns

THead
page head, null if not available
public
# setHead( THead $value )

Parameters

$value
THead
page head

Throws

TInvalidOperationException
if a head already exists
public string
# getTitle( )

Returns

string
page title.
public
# setTitle( string $value )

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

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

Parameters

$value
string
page title. This will override the title set in getHead Head.
public string
# getClientState( )

Returns the state to be stored on the client side. This method should only be used by framework and control developers.

Returns the state to be stored on the client side. This method should only be used by framework and control developers.

Returns

string
the state to be stored on the client side
public
# setClientState( string $state )

Sets the state to be stored on the client side. This method should only be used by framework and control developers.

Sets the state to be stored on the client side. This method should only be used by framework and control developers.

Parameters

$state
string
the state to be stored on the client side
public string
# getRequestClientState( )

Returns

string
the state postback from client side
public string
# getStatePersisterClass( )

Returns

string
class name of the page state persister. Defaults to TPageStatePersister.
public
# setStatePersisterClass( string $value )

Parameters

$value
string
class name of the page state persister.
public IPageStatePersister
# getStatePersister( )

Returns

IPageStatePersister
page state persister
public boolean
# getEnableStateValidation( )

Returns

boolean
whether page state should be HMAC validated. Defaults to true.
public
# setEnableStateValidation( boolean $value )

Parameters

$value
boolean
whether page state should be HMAC validated.
public boolean
# getEnableStateEncryption( )

Returns

boolean
whether page state should be encrypted. Defaults to false.
public
# setEnableStateEncryption( boolean $value )

Parameters

$value
boolean
whether page state should be encrypted.
public boolean
# getEnableStateCompression( )

Returns

boolean
whether page state should be compressed. Defaults to true.

Since

3.1.6
public
# setEnableStateCompression( boolean $value )

Parameters

$value
boolean
whether page state should be compressed.

Since

3.1.6
public string
# getPagePath( )

Returns

string
the requested page path for this page
public
# setPagePath( string $value )

Parameters

$value
string
the requested page path for this page
public
# 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.

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.

Parameters

$context
string
context of the action method. This is a property-path referring to the context object (e.g. Page, Page.ClientScript).
$funcName
string
method name of the context object
$funcParams
array
list of parameters to be passed to the action method
public TStack
# getCachingStack( )

Returns

TStack
stack of TOutputCache objects
public
# flushWriter( )

Flushes output

Flushes output

Methods inherited from TTemplateControl
createChildControls(), getIsSourceTemplateControl(), getMaster(), getMasterClass(), getTemplate(), getTemplateDirectory(), initRecursive(), injectContent(), loadTemplate(), registerContent(), registerContentPlaceHolder(), setMasterClass(), setTemplate()
Methods inherited from TControl
__get(), addParsedObject(), addToPostDataLoader(), addedControl(), applyStyleSheetSkin(), autoBindProperty(), autoDataBindProperties(), bindProperty(), broadcastEvent(), bubbleEvent(), clearChildState(), clearControlState(), clearNamingContainer(), clearViewState(), convertUniqueIdToClientId(), createControlCollection(), dataBind(), dataBindChildren(), dataBindProperties(), ensureChildControls(), findControl(), findControlsByID(), findControlsByType(), focus(), getAdapter(), getAllowChildControls(), getAttribute(), getAttributes(), getChildControlsCreated(), getClientID(), getControlStage(), getControlState(), getControls(), getCustomData(), getEnableTheming(), getEnableViewState(), getEnabled(), getHasAdapter(), getHasAttributes(), getHasChildInitialized(), getHasControls(), getHasInitialized(), getHasLoaded(), getHasLoadedPostData(), getHasPreRendered(), getID(), getIsSkinApplied(), getNamingContainer(), getPage(), getParent(), getRegisteredObject(), getSkinID(), getSourceTemplateControl(), getTemplateControl(), getUniqueID(), getViewState(), getVisible(), hasAttribute(), isDescendentOf(), isObjectRegistered(), loadRecursive(), loadStateRecursive(), onDataBinding(), onInit(), onLoad(), onPreRender(), onUnload(), preRenderRecursive(), raiseBubbleEvent(), registerObject(), removeAttribute(), removedControl(), render(), renderChildren(), renderControl(), saveStateRecursive(), setAdapter(), setAttribute(), setChildControlsCreated(), setControlStage(), setControlState(), setCustomData(), setEnableTheming(), setEnableViewState(), setEnabled(), setID(), setPage(), setSkinID(), setTemplateControl(), setViewState(), setVisible(), trackViewState(), traverseChildControls(), unbindProperty(), unloadRecursive(), unregisterObject()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __destruct(), __isset(), __set(), __sleep(), __unset(), __wakeup(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants summary
string FIELD_POSTBACK_TARGET 'PRADO_POSTBACK_TARGET'
#

system post fields

system post fields

string FIELD_POSTBACK_PARAMETER 'PRADO_POSTBACK_PARAMETER'
#
string FIELD_LASTFOCUS 'PRADO_LASTFOCUS'
#
string FIELD_PAGESTATE 'PRADO_PAGESTATE'
#
string FIELD_CALLBACK_TARGET 'PRADO_CALLBACK_TARGET'
#
string FIELD_CALLBACK_PARAMETER 'PRADO_CALLBACK_PARAMETER'
#
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
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Properties summary
protected TMap $_postData
#

data post back by user

data post back by user

protected TMap $_restPostData
#

postback data that is not handled during first invocation of LoadPostData.

postback data that is not handled during first invocation of LoadPostData.

protected array $_controlsPostDataChanged array()
#

list of controls whose data have been changed due to the postback

list of controls whose data have been changed due to the postback

protected array $_controlsRequiringPostData array()
#

list of controls that need to load post data in the current request

list of controls that need to load post data in the current request

protected array $_controlsRegisteredForPostData array()
#

list of controls that need to load post data in the next postback

list of controls that need to load post data in the next postback

protected boolean $_formRendered false
#

whether the form has been rendered

whether the form has been rendered

protected boolean $_inFormRender false
#

whether the current rendering is within a form

whether the current rendering is within a form

protected array $_postDataLoaders array()
#

post data loader IDs.

post data loader IDs.

protected boolean $_isLoadingPostData false
#

true if loading post data.

true if loading post data.

Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO