Additional client-side options and events can be set using the
{@link getClientSide ClientSide} property. The following example shows
an alert box when a TCallback component response returns successfully.
Показать файл
Открыть проект
Метод | Описание | |
---|---|---|
canCauseValidation ( ) : boolean | ||
getCallbackOptions ( ) : string | ||
getCallbackParameter ( ) : mixed | ||
getCausesValidation ( ) : boolean | ||
getClientSide ( ) : |
Callback client-side options can be set by setting the properties of
the ClientSide property. E.g. |
|
getJavascript ( ) : string |
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. |
|
getJsCallbackOptions ( ) | ||
getValidationGroup ( ) : string | ||
registerCallbackClientScript ( $class, $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 {@link getClientSide ClientSide} property. | |
setCallbackOptions ( $value ) | Sets default callback options. Takes the ID of a TCallbackOptions component to duplicate the client-side options for this control. The {@link getClientSide ClientSide} subproperties takes precedence over the CallbackOptions property. | |
setCallbackParameter ( $value ) | ||
setCausesValidation ( $value ) | ||
setClientSide ( $client ) | Sets the client side options. Can only be set when client side is null. | |
setValidationGroup ( $value ) |
Метод | Описание | |
---|---|---|
createClientSide ( ) : |
||
getClientSideOptions ( ) : array | ||
getDefaultClientSideOptions ( ) : 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 {@link setCallbackOptions CallbackOptions}. |
public canCauseValidation ( ) : boolean | ||
Результат | boolean | whether to perform validation if the callback is requested. |
protected createClientSide ( ) : |
||
Результат | callback client-side options. |
public getCallbackOptions ( ) : string | ||
Результат | string | ID of a TCallbackOptions control from which ClientSide options are duplicated. |
public getCallbackParameter ( ) : mixed | ||
Результат | mixed | callback parameter value. |
public getCausesValidation ( ) : boolean | ||
Результат | boolean | whether callback event trigger by this button will cause input validation, default is true |
public getClientSide ( ) : |
||
Результат | client-side callback options. |
protected getClientSideOptions ( ) : array | ||
Результат | array | list of callback javascript options. |
protected getDefaultClientSideOptions ( ) : array | ||
Результат | array | list of default callback client-side options. |
dispatches immediately
Prado.Callback("<%= $this->mycallback->UniqueID %>",
$this->mycallback->ActiveControl->JsCallbackOptions);
public getJavascript ( ) : string | ||
Результат | string | javascript client-side callback request object (javascript code) |
public getValidationGroup ( ) : string | ||
Результат | string | the group of validators which the button causes validation upon callback |
public registerCallbackClientScript ( $class, $options = null ) |
public setCallbackOptions ( $value ) |
public setClientSide ( $client ) |