- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

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: IListControlAdapter TActiveButton TActiveCheckBox TActiveCheckBoxList TActiveControlAdapter TActiveCustomValidator TActiveCustomValidatorClientSide TActiveDatePicker TActiveDropDownList TActiveHiddenField TActiveHyperLink TActiveImage TActiveImageButton TActiveLabel TActiveLinkButton TActiveListBox TActiveListControlAdapter TActiveListItemCollection TActivePageAdapter TActivePager TActivePanel TActiveRadioButton TActiveRadioButtonList TActiveRatingList TActiveTextBox TAutoComplete TAutoCompleteEventParameter TAutoCompleteTemplate TBaseActiveCallbackControl TBaseActiveControl TCallback TCallbackClientScript TCallbackClientSide TCallbackErrorHandler TCallbackEventParameter TCallbackOptions TCallbackPageStateTracker TCallbackResponseAdapter TCallbackResponseWriter TEventTriggeredCallback TInPlaceTextBox TInvalidCallbackException TMapCollectionDiff TScalarDiff TStyleDiff TTimeTriggeredCallback TTriggeredCallback TValueTriggeredCallback TViewStateDiff |
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.

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

         <com:TCallback Active.Control.ClientSide.OnSuccess="alert('ok!')" ... />
Since: 3.1 Author: Wei Zhuo <weizhuo[at]gmail[dot]com>
Method Summary
boolean | canCauseValidation ()
protected TCallbackClientSide | createClientSide ()
string | getCallbackOptions ()
mixed | getCallbackParameter ()
boolean | getCausesValidation ()
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.
protected array | getClientSideOptions ()
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.
string | getJavascript () Returns the javascript callback request instance. To invoke a callback
void | getJsCallbackOptions ( string 0)
string | getValidationGroup ()
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 | setClientSide ( TCallbackClientSide $client) 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

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

     //dispatches immediately
      Prado.Callback("<%= $this->mycallback->UniqueID %>",
        $this->mycallback->ActiveControl->JsCallbackOptions);
Output
string | javascript client-side callback request object (javascript code)
Exception
## getJsCallbackOptions
public void getJsCallbackOptions | (string 0 )
Input
string | 0 | callback 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 | $class | client side javascript class name.
array | $options | additional 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 | $value | ID of a TCallbackOptions control from which ClientSide options are cloned.
Output
Exception
## setCallbackParameter
public void setCallbackParameter | (mixed $value )
Input
mixed | $value | callback parameter value.
Output
Exception
## setCausesValidation
public void setCausesValidation | (boolean $value )
Input
boolean | $value | whether 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 | $client | client side options.
Output
Exception
## setValidationGroup
public void setValidationGroup | (string $value )
Input
string | $value | the group of validators which the button causes validation upon callback
Output
Exception