## Class TActivePageAdapter

Description

TActivePageAdapter class.

Callback request handler.

- since: 3.1
- version: $Id: TActivePageAdapter.php 1827 2007-04-02 06:19:55Z wei $
- author: Wei Zhuo <weizhuo[at]gamil[dot]com>

Located in /Web/UI/ActiveControls/TActivePageAdapter.php (line 30)

    TComponent
       |
       --TApplicationComponent
          |
          --TControlAdapter
             |
             --TActivePageAdapter

Class Constant Summary
CALLBACK_ACTION_HEADER = 'X-PRADO-ACTIONS'
CALLBACK_DATA_HEADER = 'X-PRADO-DATA'
CALLBACK_ERROR_HEADER = 'X-PRADO-ERROR'
CALLBACK_PAGESTATE_HEADER = 'X-PRADO-PAGESTATE'
CALLBACK_REDIRECT = 'X-PRADO-REDIRECT'
Method Summary
TActivePageAdapter __construct (TPage $control)
TCallbackClientScript getCallbackClientHandler ()
string getCallbackEventParameter ()
TControl getCallbackEventTarget ()
void processCallbackEvent (THtmlWriter $writer)
void redirect (string $url)
void registerControlToRender (TControl $control, THtmlWriter $writer)
void renderCallbackResponse (THtmlWriter $writer)
void renderResponse (THtmlWriter $writer)
void setCallbackEventParameter (mixed $value)
void setCallbackEventTarget (TControl $control)
void trapCallbackErrorsExceptions ()
Methods
Constructor __construct (line 73)

Constructor, trap errors and exception to let the callback response handle them.

- access: public

TActivePageAdapter __construct (TPage $control)

Redefinition of:

TControlAdapter::__construct()
  Constructor.

getCallbackClientHandler (line 285)

Gets the callback client script handler. It handlers the javascript functions to be executed during the callback response.

- return: callback client handler.
- access: public

TCallbackClientScript getCallbackClientHandler ()
getCallbackEventParameter (line 261)

Gets callback parameter. JSON encoding is assumed.

- return: postback event parameter
- access: public

string getCallbackEventParameter ()
getCallbackEventTarget (line 237)

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

TControl getCallbackEventTarget ()
processCallbackEvent (line 88)

Process the callback request.

- access: public

void processCallbackEvent (THtmlWriter $writer)

- THtmlWriter $writer: html content writer.

redirect (line 131)

Redirect url on the client-side using javascript.

- access: protected

void redirect (string $url)

- string $url: new url to load.

registerControlToRender (line 99)

Register a control for defered render() call.

- access: public

void registerControlToRender (TControl $control, THtmlWriter $writer)

- TControl $control: control for defered rendering
- THtmlWriter $writer: the renderer

renderCallbackResponse (line 118)

Render the callback response.

- access: public

void renderCallbackResponse (THtmlWriter $writer)

- THtmlWriter $writer: html content writer.

renderResponse (line 144)

Renders the callback response by adding additional callback data and javascript actions in the header and page state if required.

- access: protected

void renderResponse (THtmlWriter $writer)

- THtmlWriter $writer: html content writer.

setCallbackEventParameter (line 275)

- access: public

void setCallbackEventParameter (mixed $value)

- mixed $value: postback event parameter

setCallbackEventTarget (line 252)

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.

trapCallbackErrorsExceptions (line 109)

Trap errors and exceptions to be handled by TCallbackErrorHandler.

- access: protected

void trapCallbackErrorsExceptions ()

#### Inherited Methods

Inherited From TControlAdapter

> TControlAdapter::__construct()
> TControlAdapter::createChildControls()
> TControlAdapter::getControl()
> TControlAdapter::getPage()
> TControlAdapter::loadState()
> TControlAdapter::onInit()
> TControlAdapter::onLoad()
> TControlAdapter::onPreRender()
> TControlAdapter::onUnload()
> TControlAdapter::render()
> TControlAdapter::renderChildren()
> TControlAdapter::saveState()

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
CALLBACK_ACTION_HEADER = 'X-PRADO-ACTIONS' (line 39)

Callback response client-side action header name.

CALLBACK_DATA_HEADER = 'X-PRADO-DATA' (line 35)

Callback response data header name.

CALLBACK_ERROR_HEADER = 'X-PRADO-ERROR' (line 43)

Callback error header name.

CALLBACK_PAGESTATE_HEADER = 'X-PRADO-PAGESTATE' (line 47)

Callback page state header name.

CALLBACK_REDIRECT = 'X-PRADO-REDIRECT' (line 52)

Callback redirect url header name.

Documentation generated on Sun, 30 Sep 2007 19:10:13 -0400 by phpDocumentor 1.3.0RC4