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.
  • 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.
* 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.

  • 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 HasPriority to true when enabled.

  • author: Wei Zhuo <weizhuo[at]gamil[dot]com>
  • version: $Id: TCallbackClientSide.php 3116 2012-03-23 18:15:03Z ctrlaltca@gmail.com $
  • since: 3.1

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

TComponent
   |
   --TClientSideOptions
      |
      --TCallbackClientSide
Direct descendents
Class Description
TActiveCustomValidatorClientSide Custom Validator callback client side options class.
Method Summary
string ensureFunction (string $javascript)
boolean getHasPriority ()
string getOnComplete ()
string getOnException ()
string getOnFailure ()
string getOnInteractive ()
string getOnLoaded ()
string getOnLoading ()
string getOnPreDispatch ()
string getOnSuccess ()
string getOnUninitialized ()
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 60)

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

Redefinition of:
TClientSideOptions::ensureFunction()
Ensure that the javascript statements are wrapped in a javascript function block as
  1. function(senderparameter)//code }
.
getEnablePageStateUpdate (line 282)
  • return: client-side viewstate will be updated on callback response if true. Default is true.
  • access: public
boolean getEnablePageStateUpdate ()
getHasPriority (line 245)
  • 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 146)
  • return: javascript code for client-side onComplete event
  • access: public
string getOnComplete ()
getOnException (line 193)
  • return: javascript code for client-side onException event
  • access: public
string getOnException ()
getOnFailure (line 177)
  • return: javascript code for client-side onFailure event
  • access: public
string getOnFailure ()
getOnInteractive (line 131)
  • return: javascript code for client-side onInteractive event
  • access: public
string getOnInteractive ()
getOnLoaded (line 116)
  • return: javascript code for client-side onLoaded event
  • access: public
string getOnLoaded ()
getOnLoading (line 100)
  • return: javascript code for client-side onLoading event
  • access: public
string getOnLoading ()
getOnPreDispatch (line 76)
  • return: javascript code to be executed before a request is dispatched.
  • access: public
string getOnPreDispatch ()
getOnSuccess (line 161)
  • return: javascript code for client-side onSuccess event
  • access: public
string getOnSuccess ()
getOnUninitialized (line 84)
  • return: javascript code for client-side onUninitialized event
  • access: public
string getOnUninitialized ()
getPostBackParameter (line 309)
  • return: post back event parameter.
  • access: public
string getPostBackParameter ()
getPostBackTarget (line 291)
  • return: post back target ID
  • access: public
string getPostBackTarget ()
getPostState (line 210)
  • return: true to post the inputs of the form on callback, default is post the inputs on callback.
  • access: public
boolean getPostState ()
getRequestTimeOut (line 227)
  • return: callback request timeout.
  • access: public
integer getRequestTimeOut ()
setEnablePageStateUpdate (line 270)

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 256)
  • 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 154)
  • access: public
void setOnComplete (string $javascript)
  • string $javascript: javascript code for client-side onComplete event.
setOnException (line 201)
  • access: public
void setOnException (string $javascript)
  • string $javascript: javascript code for client-side onException event.
setOnFailure (line 185)
  • access: public
void setOnFailure (string $javascript)
  • string $javascript: javascript code for client-side onFailure event.
setOnInteractive (line 139)
  • access: public
void setOnInteractive (string $javascript)
  • string $javascript: javascript code for client-side onInteractive event.
setOnLoaded (line 124)
  • access: public
void setOnLoaded (string $javascript)
  • string $javascript: javascript code for client-side onLoaded event.
setOnLoading (line 108)
  • access: public
void setOnLoading (string $javascript)
  • string $javascript: javascript code for client-side onLoading event.
setOnPreDispatch (line 68)
  • access: public
void setOnPreDispatch (string $javascript)
  • string $javascript: javascript code to be executed before a request is dispatched.
setOnSuccess (line 169)
  • access: public
void setOnSuccess (string $javascript)
  • string $javascript: javascript code for client-side onSuccess event.
setOnUninitialized (line 92)
  • access: public
void setOnUninitialized (string $javascript)
  • string $javascript: javascript code for client-side onUninitialized event.
setPostBackParameter (line 317)
  • access: public
void setPostBackParameter (string $value)
  • string $value: post back event parameter.
setPostBackTarget (line 299)
  • access: public
void setPostBackTarget (string $value)
  • string $value: post back target ID
setPostState (line 219)
  • 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 235)
  • 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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()

Documentation generated on Mon, 25 Jun 2012 14:37:28 +0200 by phpDocumentor 1.4.3