## Class TBaseActiveCallbackControl

Description

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
- version: $Id: TBaseActiveControl.php 2564 2008-11-11 21:56:02Z carlgmathisen $
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/ActiveControls/TBaseActiveControl.php (line 161)

    TComponent
       |
       --TBaseActiveControl
          |
          --TBaseActiveCallbackControl

Method Summary
boolean canCauseValidation ()
TCallbackClientSide createClientSide ()
string getCallbackOptions ()
mixed getCallbackParameter ()
boolean getCausesValidation ()
TCallbackClientSide getClientSide ()
array getClientSideOptions ()
array getDefaultClientSideOptions ()
string getJavascript ()
void getJsCallbackOptions (string 0)
string getValidationGroup ()
void registerCallbackClientScript (string $class, [array $options = null])
void setCallbackOptions (string $value)
void setCallbackParameter (mixed $value)
void setCausesValidation (boolean $value)
void setClientSide (TCallbackClientSide $client)
void setValidationGroup (string $value)
Methods
canCauseValidation (line 293)

- return: whether to perform validation if the callback is requested.
- access: public

boolean canCauseValidation ()
createClientSide (line 195)

- return: callback client-side options.
- access: protected

TCallbackClientSide createClientSide ()
getCallbackOptions (line 217)

- return: ID of a TCallbackOptions control from which ClientSide options are duplicated.
- access: public

string getCallbackOptions ()
getCallbackParameter (line 315)

- return: callback parameter value.
- access: public

mixed getCallbackParameter ()
getCausesValidation (line 257)

- return: whether callback event trigger by this button will cause input validation, default is true
- access: public

boolean getCausesValidation ()
getClientSide (line 169)

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.

- return: client-side callback options.
- access: public

TCallbackClientSide getClientSide ()
getClientSideOptions (line 324)

- return: list of callback javascript options.
- access: protected

array getClientSideOptions ()
getDefaultClientSideOptions (line 228)

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.

- return: list of default callback client-side options.
- access: protected

array getDefaultClientSideOptions ()
getJavascript (line 377)

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

- return: javascript client-side callback request object (javascript code)
- access: public

string getJavascript ()
getJsCallbackOptions (line 386)

- access: public

void getJsCallbackOptions (string 0)

- string 0: callback requestion options as javascript code.

getValidationGroup (line 275)

- return: the group of validators which the button causes validation upon callback
- access: public

string getValidationGroup ()
registerCallbackClientScript (line 344)

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.

- access: public

void registerCallbackClientScript (string $class, [array $options = null])

- string $class: client side javascript class name.
- array $options: additional callback options.

setCallbackOptions (line 208)

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.

- access: public

void setCallbackOptions (string $value)

- string $value: ID of a TCallbackOptions control from which ClientSide options are cloned.

setCallbackParameter (line 307)

- access: public

void setCallbackParameter (mixed $value)

- mixed $value: callback parameter value.

setCausesValidation (line 266)

- access: public

void setCausesValidation (boolean $value)

- boolean $value: whether callback event trigger by this button will cause input validation

setClientSide (line 183)

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

- access: public

void setClientSide (TCallbackClientSide $client)

- TCallbackClientSide $client: client side options.

setValidationGroup (line 284)

- access: public

void setValidationGroup (string $value)

- string $value: the group of validators which the button causes validation upon callback

#### Inherited Methods

Inherited From TBaseActiveControl

> TBaseActiveControl::__construct()
> TBaseActiveControl::canUpdateClientSide()
> TBaseActiveControl::getControl()
> TBaseActiveControl::getEnableUpdate()
> TBaseActiveControl::getOption()
> TBaseActiveControl::getOptions()
> TBaseActiveControl::getPage()
> TBaseActiveControl::setEnableUpdate()
> TBaseActiveControl::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, 11 Jan 2009 20:17:29 -0500 by phpDocumentor 1.3.0RC4