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.
Method Summary |
protected
string
|
Returns javascript statement enclosed within a javascript function.
|
boolean
|
|
boolean
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
boolean
|
|
integer
|
|
void
|
Set to true to enable the callback response to enable the viewstate update. This will automatically set HasPrority to true.
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
Method Details |
ensureFunction
protected string ensureFunction |
(string $javascript ) |
Returns javascript statement enclosed within a javascript function.
Input |
string | $javascript | javascript statement, if string begins within "javascript:" the whole string is assumed to be a function. |
Output |
string
| javascript statement wrapped in a javascript function |
Exception |
|
getEnablePageStateUpdate
public boolean getEnablePageStateUpdate |
() |
Output |
boolean
| client-side viewstate will be updated on callback response if true. Default is true. |
Exception |
|
getHasPriority
public boolean getHasPriority |
() |
Output |
boolean
| 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. |
Exception |
|
getOnComplete
public string getOnComplete |
() |
Output |
string
| javascript code for client-side onComplete event |
Exception |
|
getOnException
public string getOnException |
() |
Output |
string
| javascript code for client-side onException event |
Exception |
|
getOnFailure
public string getOnFailure |
() |
Output |
string
| javascript code for client-side onFailure event |
Exception |
|
getOnInteractive
public string getOnInteractive |
() |
Output |
string
| javascript code for client-side onInteractive event |
Exception |
|
getOnLoaded
public string getOnLoaded |
() |
Output |
string
| javascript code for client-side onLoaded event |
Exception |
|
getOnLoading
public string getOnLoading |
() |
Output |
string
| javascript code for client-side onLoading event |
Exception |
|
getOnPreDispatch
public string getOnPreDispatch |
() |
Output |
string
| javascript code to be executed before a request is dispatched. |
Exception |
|
getOnSuccess
public string getOnSuccess |
() |
Output |
string
| javascript code for client-side onSuccess event |
Exception |
|
getOnUninitialized
public string getOnUninitialized |
() |
Output |
string
| javascript code for client-side onUninitialized event |
Exception |
|
getPostBackParameter
public string getPostBackParameter |
() |
Output |
string
| post back event parameter. |
Exception |
|
getPostBackTarget
public string getPostBackTarget |
() |
Output |
string
| post back target ID |
Exception |
|
getPostState
public boolean getPostState |
() |
Output |
boolean
| true to post the inputs of the form on callback, default is post the inputs on callback. |
Exception |
|
getRequestTimeOut
public integer getRequestTimeOut |
() |
Output |
integer
| callback request timeout. |
Exception |
|
setEnablePageStateUpdate
public void setEnablePageStateUpdate |
(boolean $value ) |
Set to true to enable the callback response to enable the viewstate update. This will automatically set HasPrority to true.
Input |
boolean | $value | true enables the callback response to update the viewstate. |
Output |
Exception |
|
setHasPriority
public void setHasPriority |
(boolean $value ) |
Input |
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. |
Output |
Exception |
|
setOnComplete
public void setOnComplete |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onComplete event. |
Output |
Exception |
|
setOnException
public void setOnException |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onException event. |
Output |
Exception |
|
setOnFailure
public void setOnFailure |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onFailure event. |
Output |
Exception |
|
setOnInteractive
public void setOnInteractive |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onInteractive event. |
Output |
Exception |
|
setOnLoaded
public void setOnLoaded |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onLoaded event. |
Output |
Exception |
|
setOnLoading
public void setOnLoading |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onLoading event. |
Output |
Exception |
|
setOnPreDispatch
public void setOnPreDispatch |
(string $javascript ) |
Input |
string | $javascript | javascript code to be executed before a request is dispatched. |
Output |
Exception |
|
setOnSuccess
public void setOnSuccess |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onSuccess event. |
Output |
Exception |
|
setOnUninitialized
public void setOnUninitialized |
(string $javascript ) |
Input |
string | $javascript | javascript code for client-side onUninitialized event. |
Output |
Exception |
|
setPostBackParameter
public void setPostBackParameter |
(string $value ) |
Input |
string | $value | post back event parameter. |
Output |
Exception |
|
setPostBackTarget
public void setPostBackTarget |
(string $value ) |
Input |
string | $value | post back target ID |
Output |
Exception |
|
setPostState
public void setPostState |
(boolean $value ) |
Input |
boolean | $value | true to post the inputs of the form with callback requests. Default is to post the inputs. |
Output |
Exception |
|
setRequestTimeOut
public void setRequestTimeOut |
(integer $value ) |
Input |
integer | $value | callback request timeout |
Output |
Exception |
|