PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class 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 ActiveControl property.

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

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

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

<com:TCallback ActiveControl.ClientSide.OnSuccess="alert('ok!')" ... />
TComponent
Extended by TBaseActiveControl
Extended by TBaseActiveCallbackControl
Package: System\Web\UI\ActiveControls
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizhuo[at]gmail[dot]com>
Since: 3.1
Located at Web/UI/ActiveControls/TBaseActiveControl.php
Methods summary
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.

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.

Returns

TCallbackClientSide
client-side callback options.
public
# setClientSide( TCallbackClientSide $client )

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

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

Parameters

$client
TCallbackClientSide
client side options.
protected TCallbackClientSide
# createClientSide( )

Returns

TCallbackClientSide
callback client-side options.
public
# 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 ClientSide subproperties takes precedence over the CallbackOptions property.

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

Parameters

$value
string
ID of a TCallbackOptions control from which ClientSide options are cloned.
public string
# getCallbackOptions( )

Returns

string
ID of a TCallbackOptions control from which ClientSide options are duplicated.
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 setCallbackOptions CallbackOptions.

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

Returns

array
list of default callback client-side options.
public boolean
# getCausesValidation( )

Returns

boolean
whether callback event trigger by this button will cause input validation, default is true
public
# setCausesValidation( boolean $value )

Parameters

$value
boolean
whether callback event trigger by this button will cause input validation
public string
# getValidationGroup( )

Returns

string
the group of validators which the button causes validation upon callback
public
# setValidationGroup( string $value )

Parameters

$value
string
the group of validators which the button causes validation upon callback
public boolean
# canCauseValidation( )

Returns

boolean
whether to perform validation if the callback is requested.
public
# setCallbackParameter( mixed $value )

Parameters

$value
mixed
callback parameter value.
public mixed
# getCallbackParameter( )

Returns

mixed
callback parameter value.
protected array
# getClientSideOptions( )

Returns

array
list of callback javascript options.
public
# registerCallbackClientScript( string $class, array $options = null )

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 getClientSide ClientSide property.

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 getClientSide ClientSide property.

Parameters

$class
string
client side javascript class name.
$options
array
additional callback options.
public string
# getJavascript( )

Returns the javascript callback request instance. To invoke a callback request for this control call the dispatch() method on the request instance. Example code in javascript

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

Returns the javascript callback request instance. To invoke a callback request for this control call the dispatch() 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);

Returns

string
javascript client-side callback request object (javascript code)
public
# getJsCallbackOptions( )
Methods inherited from TBaseActiveControl
__construct(), canUpdateClientSide(), getControl(), getEnableUpdate(), getOption(), getOptions(), getPage(), setEnableUpdate(), setOption()
Methods inherited from TComponent
__call(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO