## 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.

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.

- PostInputs 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 1598 2007-01-06 00:00:57Z wei $
- author: Wei Zhuo <weizhuo[at]gamil[dot]com>

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

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

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

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

boolean getEnablePageStateUpdate ()
getHasPriority (line 240)

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

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

string getOnComplete ()
getOnException (line 188)

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

string getOnException ()
getOnFailure (line 172)

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

string getOnFailure ()
getOnInteractive (line 126)

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

string getOnInteractive ()
getOnLoaded (line 111)

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

string getOnLoaded ()
getOnLoading (line 95)

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

string getOnLoading ()
getOnPreDispatch (line 71)

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

string getOnPreDispatch ()
getOnSuccess (line 156)

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

string getOnSuccess ()
getOnUninitialized (line 79)

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

string getOnUninitialized ()
getPostBackParameter (line 304)

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

string getPostBackParameter ()
getPostBackTarget (line 286)

- return: post back target ID
- access: public

string getPostBackTarget ()
getPostState (line 205)

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

boolean getPostState ()
getRequestTimeOut (line 222)

- return: callback request timeout.
- access: public

integer getRequestTimeOut ()
setEnablePageStateUpdate (line 265)

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

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

- access: public

void setOnComplete (string $javascript)

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

setOnException (line 196)

- access: public

void setOnException (string $javascript)

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

setOnFailure (line 180)

- access: public

void setOnFailure (string $javascript)

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

setOnInteractive (line 134)

- access: public

void setOnInteractive (string $javascript)

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

setOnLoaded (line 119)

- access: public

void setOnLoaded (string $javascript)

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

setOnLoading (line 103)

- access: public

void setOnLoading (string $javascript)

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

setOnPreDispatch (line 63)

- access: public

void setOnPreDispatch (string $javascript)

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

setOnSuccess (line 164)

- access: public

void setOnSuccess (string $javascript)

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

setOnUninitialized (line 87)

- access: public

void setOnUninitialized (string $javascript)

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

setPostBackParameter (line 312)

- access: public

void setPostBackParameter (string $value)

- string $value: post back event parameter.

setPostBackTarget (line 294)

- access: public

void setPostBackTarget (string $value)

- string $value: post back target ID

setPostState (line 214)

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

- 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, 14 Jan 2007 21:41:25 -0500 by phpDocumentor 1.3.0RC4