## Class TCallbackClientSide

Description

TCallbackClientSide class.

The following client side events are executing in order if the callback request and response are send and received successfuly.

- onPreDispatch executed before a request is dispatched.
- onUninitialized executed when callback request is uninitialized.
- onLoading* executed when callback request is initiated
- onLoaded* executed when callback request begins.
- onInteractive executed when callback request is in progress.
- onCompleteexecuted when callback response returns.

* Note that theses 2 events are not fired correctly by Opera. To make them work in this browser, Prado will fire them just after onPreDispatch.

In a general way, onUninitialized, onLoading, onLoaded and onInteractive events are not implemented consistently in all browsers.When cross browser compatibility is needed, it is best to avoid use them

The OnSuccess and OnFailure events are raised when the response is returned. A successful request/response will raise OnSuccess event otherwise OnFailure will be raised.

- onSuccess executed when callback request returns and is successful.
- onFailure executed when callback request returns and fails.
- onException raised when callback request fails due to request/response errors.

- PostState true to collect the form inputs and post them during callback, default is true.
- RequestTimeOut The request timeout in milliseconds.
- HasPriority true to ensure that the callback request will be sent immediately and will abort existing prioritized requests. It does not affect callbacks that are not prioritized.
- EnablePageStateUpdate enable the callback response to enable the viewstate update. This will automatically set HasPrority to true when enabled.

- since: 3.1
- version: $Id: TCallbackClientSide.php 2541 2008-10-21 15:05:13Z qiang.xue $
- author: Wei Zhuo <weizhuo[at]gamil[dot]com>

Located in /Web/UI/ActiveControls/TCallbackClientSide.php (line 54)

    TComponent
       |
       --TClientSideOptions
          |
          --TCallbackClientSide

Direct descendents

Class | Description
--- | ---
TActiveCustomValidatorClientSide | Custom Validator callback client side options class.

Method Summary
string ensureFunction (string $javascript)
boolean getEnablePageStateUpdate ()
boolean getHasPriority ()
string getOnComplete ()
string getOnException ()
string getOnFailure ()
string getOnInteractive ()
string getOnLoaded ()
string getOnLoading ()
string getOnPreDispatch ()
string getOnSuccess ()
string getOnUninitialized ()
string getPostBackParameter ()
string getPostBackTarget ()
boolean getPostState ()
integer getRequestTimeOut ()
void setEnablePageStateUpdate (boolean $value)
void setHasPriority (boolean $value)
void setOnComplete (string $javascript)
void setOnException (string $javascript)
void setOnFailure (string $javascript)
void setOnInteractive (string $javascript)
void setOnLoaded (string $javascript)
void setOnLoading (string $javascript)
void setOnPreDispatch (string $javascript)
void setOnSuccess (string $javascript)
void setOnUninitialized (string $javascript)
void setPostBackParameter (string $value)
void setPostBackTarget (string $value)
void setPostState (boolean $value)
void setRequestTimeOut (integer $value)
Methods
ensureFunction (line 62)

Returns javascript statement enclosed within a javascript function.

- return: javascript statement wrapped in a javascript function
- access: protected

string ensureFunction (string $javascript)

- string $javascript: javascript statement, if string begins within "javascript:" the whole string is assumed to be a function.

Redefinition of:

TClientSideOptions::ensureFunction()
  Ensure that the javascript statements are wrapped in a javascript function block as

      function(sender, parameter){ //code }

  .

getEnablePageStateUpdate (line 284)

- return: client-side viewstate will be updated on callback response if true. Default is true.
- access: public

boolean getEnablePageStateUpdate ()
getHasPriority (line 247)

- return: true if the callback request has priority and will abort existing prioritized request in order to send immediately. It does not affect callbacks that are not prioritized. Default is true.
- access: public

boolean getHasPriority ()
getOnComplete (line 148)

- return: javascript code for client-side onComplete event
- access: public

string getOnComplete ()
getOnException (line 195)

- return: javascript code for client-side onException event
- access: public

string getOnException ()
getOnFailure (line 179)

- return: javascript code for client-side onFailure event
- access: public

string getOnFailure ()
getOnInteractive (line 133)

- return: javascript code for client-side onInteractive event
- access: public

string getOnInteractive ()
getOnLoaded (line 118)

- return: javascript code for client-side onLoaded event
- access: public

string getOnLoaded ()
getOnLoading (line 102)

- return: javascript code for client-side onLoading event
- access: public

string getOnLoading ()
getOnPreDispatch (line 78)

- return: javascript code to be executed before a request is dispatched.
- access: public

string getOnPreDispatch ()
getOnSuccess (line 163)

- return: javascript code for client-side onSuccess event
- access: public

string getOnSuccess ()
getOnUninitialized (line 86)

- return: javascript code for client-side onUninitialized event
- access: public

string getOnUninitialized ()
getPostBackParameter (line 311)

- return: post back event parameter.
- access: public

string getPostBackParameter ()
getPostBackTarget (line 293)

- return: post back target ID
- access: public

string getPostBackTarget ()
getPostState (line 212)

- return: true to post the inputs of the form on callback, default is post the inputs on callback.
- access: public

boolean getPostState ()
getRequestTimeOut (line 229)

- return: callback request timeout.
- access: public

integer getRequestTimeOut ()
setEnablePageStateUpdate (line 272)

Set to true to enable the callback response to enable the viewstate update. This will automatically set HasPrority to true.

- access: public

void setEnablePageStateUpdate (boolean $value)

- boolean $value: true enables the callback response to update the viewstate.

setHasPriority (line 258)

- access: public

void setHasPriority (boolean $value)

- boolean $value: true to ensure that the callback request will be sent immediately and will abort existing prioritized requests. It does not affect callbacks that are not prioritized.

setOnComplete (line 156)

- access: public

void setOnComplete (string $javascript)

- string $javascript: javascript code for client-side onComplete event.

setOnException (line 203)

- access: public

void setOnException (string $javascript)

- string $javascript: javascript code for client-side onException event.

setOnFailure (line 187)

- access: public

void setOnFailure (string $javascript)

- string $javascript: javascript code for client-side onFailure event.

setOnInteractive (line 141)

- access: public

void setOnInteractive (string $javascript)

- string $javascript: javascript code for client-side onInteractive event.

setOnLoaded (line 126)

- access: public

void setOnLoaded (string $javascript)

- string $javascript: javascript code for client-side onLoaded event.

setOnLoading (line 110)

- access: public

void setOnLoading (string $javascript)

- string $javascript: javascript code for client-side onLoading event.

setOnPreDispatch (line 70)

- access: public

void setOnPreDispatch (string $javascript)

- string $javascript: javascript code to be executed before a request is dispatched.

setOnSuccess (line 171)

- access: public

void setOnSuccess (string $javascript)

- string $javascript: javascript code for client-side onSuccess event.

setOnUninitialized (line 94)

- access: public

void setOnUninitialized (string $javascript)

- string $javascript: javascript code for client-side onUninitialized event.

setPostBackParameter (line 319)

- access: public

void setPostBackParameter (string $value)

- string $value: post back event parameter.

setPostBackTarget (line 301)

- access: public

void setPostBackTarget (string $value)

- string $value: post back target ID

setPostState (line 221)

- access: public

void setPostState (boolean $value)

- boolean $value: true to post the inputs of the form with callback requests. Default is to post the inputs.

setRequestTimeOut (line 237)

- access: public

void setRequestTimeOut (integer $value)

- integer $value: callback request timeout

#### Inherited Methods

Inherited From TClientSideOptions

> TClientSideOptions::__construct()
> TClientSideOptions::ensureFunction()
> TClientSideOptions::getOption()
> TClientSideOptions::getOptions()
> TClientSideOptions::setFunction()
> TClientSideOptions::setOption()

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

Documentation generated on Sun, 11 Jan 2009 20:19:21 -0500 by phpDocumentor 1.3.0RC4