Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TBaseActiveCallbackControl

TComponent
   |
   --TBaseActiveControl
      |
      --TBaseActiveCallbackControl

TBaseActiveCallbackControl is a common set of options and functionality for active controls that can perform callback requests.

The properties of TBaseActiveCallbackControl can be accessed and changed from each individual active controls' getActiveControl property.

The following example to set the validation group property of a TCallback component.

  1. <com:TCallback ActiveControl.ValidationGroup="group1" ... />

Additional client-side options and events can be set using the ClientSide property. The following example to show an alert box when a TCallback component response returns successfully.

  1. <com:TCallback Active.Control.ClientSide.OnSuccess="alert('ok!')" ... />

Since: 3.1
Author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Method Summary
boolean
protected  TCallbackClientSide
string
mixed
boolean
TCallbackClientSide
Callback client-side options can be set by setting the properties of the ClientSide property. E.g. <com:TCallback ActiveControl.ClientSide.OnSuccess="..." /> See TCallbackClientSide for details on the properties of ClientSide.
protected  array
protected  array
Returns an array of default callback client-side options. The default options are obtained from the client-side options of a TCallbackOptions control with ID specified by setCallbackOptionsID.
string
Returns the javascript callback request instance. To invoke a callback
void
getJsCallbackOptions ( string 0)
string
void
registerCallbackClientScript ( string $class, array $options)
Registers the callback control javascript code. Client-side options are
void
setCallbackOptions ( string $value)
Sets default callback options. Takes the ID of a TCallbackOptions component to duplicate the client-side options for this control. The getClientSide subproperties has precendent over the CallbackOptions property.
void
setCallbackParameter ( mixed $value)
void
setCausesValidation ( boolean $value)
void
Sets the client side options. Can only be set when client side is null.
void
setValidationGroup ( string $value)
Methods Inherited From TBaseActiveControl
TBaseActiveControl::canUpdateClientSide(), TBaseActiveControl::getControl(), TBaseActiveControl::getEnableUpdate(), TBaseActiveControl::getOption(), TBaseActiveControl::getOptions(), TBaseActiveControl::getPage(), TBaseActiveControl::setEnableUpdate(), TBaseActiveControl::setOption()
Methods 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()

Method Details

canCauseValidation

public boolean canCauseValidation ()

Output
boolean whether to perform validation if the callback is requested.
Exception

createClientSide

protected TCallbackClientSide createClientSide ()

Output
TCallbackClientSide callback client-side options.
Exception

getCallbackOptions

public string getCallbackOptions ()

Output
string ID of a TCallbackOptions control from which ClientSide options are duplicated.
Exception

getCallbackParameter

public mixed getCallbackParameter ()

Output
mixed callback parameter value.
Exception

getCausesValidation

public boolean getCausesValidation ()

Output
boolean whether callback event trigger by this button will cause input validation, default is true
Exception

getClientSide

public TCallbackClientSide getClientSide ()

Callback client-side options can be set by setting the properties of the ClientSide property. E.g. <com:TCallback ActiveControl.ClientSide.OnSuccess="..." /> See TCallbackClientSide for details on the properties of ClientSide.

Output
TCallbackClientSide client-side callback options.
Exception

getClientSideOptions

protected array getClientSideOptions ()

Output
array list of callback javascript options.
Exception

getDefaultClientSideOptions

protected array getDefaultClientSideOptions ()

Returns an array of default callback client-side options. The default options are obtained from the client-side options of a TCallbackOptions control with ID specified by setCallbackOptionsID.

Output
array list of default callback client-side options.
Exception

getJavascript

public string getJavascript ()

Returns the javascript callback request instance. To invoke a callback

request for this control call the <tt>dispatch()</tt> method on the request instance. Example code in javascript

  1. var request = <%= $this->mycallback->ActiveControl->Javascript %>;
  2. request.setParameter('hello');
  3. request.dispatch(); //make the callback request.

Alternatively,

  1. //dispatches immediately
  2. Prado.Callback("<%= $this->mycallback->UniqueID %>",
  3. $this->mycallback->ActiveControl->JsCallbackOptions);

Output
string javascript client-side callback request object (javascript code)
Exception

getJsCallbackOptions

public void getJsCallbackOptions (string 0 )

Input
string0callback requestion options as javascript code.
Output
Exception

getValidationGroup

public string getValidationGroup ()

Output
string the group of validators which the button causes validation upon callback
Exception

registerCallbackClientScript

public void registerCallbackClientScript (string $class , array $options )

Registers the callback control javascript code. Client-side options are

merged and passed to the javascript code. This method should be called by Active component developers wanting to register the javascript to initialize the active component with additional options offered by the ClientSide property.

Input
string$classclient side javascript class name.
array$optionsadditional callback options.
Output
Exception

setCallbackOptions

public void setCallbackOptions (string $value )

Sets default callback options. Takes the ID of a TCallbackOptions component to duplicate the client-side options for this control. The getClientSide subproperties has precendent over the CallbackOptions property.

Input
string$valueID of a TCallbackOptions control from which ClientSide options are cloned.
Output
Exception

setCallbackParameter

public void setCallbackParameter (mixed $value )

Input
mixed$valuecallback parameter value.
Output
Exception

setCausesValidation

public void setCausesValidation (boolean $value )

Input
boolean$valuewhether callback event trigger by this button will cause input validation
Output
Exception

setClientSide

public void setClientSide (TCallbackClientSide $client )

Sets the client side options. Can only be set when client side is null.

Input
TCallbackClientSide$clientclient side options.
Output
Exception

setValidationGroup

public void setValidationGroup (string $value )

Input
string$valuethe group of validators which the button causes validation upon callback
Output
Exception