From 1d729693961dfa4cf4da45a05d703b392dbcb47f Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 12 Jan 2014 23:45:18 +0100 Subject: Quickstart Doc overhaul, pt. 2: active controls + minor fixes --- .../pages/ActiveControls/ActiveButton.page | 66 ---------------------- 1 file changed, 66 deletions(-) (limited to 'demos/quickstart/protected/pages/ActiveControls/ActiveButton.page') diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page b/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page index d4167f6e..6385b658 100755 --- a/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page @@ -24,70 +24,4 @@ events of an TActiveButton.

-

TActiveButton Class Diagram

-

The class diagram for TActiveButton is illustrated in the figure below. -Most active control that can perform callback request have a similar structure. -

- - class="figure" - alt="TActiveButton class diagram" title="TActiveButton class diagram" /> - -

TActiveButton is an extension of TButton -and implements two additional interfaces ICallbackEventHandler and -IActiveControl. The TActiveButton contains an instance of -TBaseActiveCallbackControl -available through the ActiveControl property of TActiveButton. -The following example set the callback parameter of the TActiveButton when -a callback request is dispatched. -

- -<com:TActiveButton - Text="Click Me" - OnCallback="button_callback" - ActiveControl.CallbackParameter="value" /> - -

In the OnCallback event handler method, the CallbackParameter -is available in the $param object.

- -public function button_callback($sender, $param) -{ - echo $param->CallbackParameter; //outputs "value" -} - - -

Adding Client Side Behaviour

- -

With in the ActiveControl property is an instance of -TCallbackClientSide available -as a property ClientSide of TActiveButton. -The ClientSide property contains sub-properties, such as RequestTimeOut, -and client-side javascript event handler, such as OnLoading, -that are used by the client-side when making a callback request. -The following example demonstrates the toggling of a "loading" indicator -when the client-side is making a callback request. -

- - -<com:TClientScript PradoScripts="effects" /> -Loading... - -<com:TActiveButton - Text="Click Me" - OnCallback="button_callback" - ActiveControl.CallbackParameter="value" > - <prop:ClientSide - OnLoading="Element.show('callback_status')" - OnComplete="Element.hide('callback_status')" /> -</com:TActiveButton> - - -

The example loads the "effects" javascript library using the -TClientScript component. -The ClientSide.OnLoading property value contains -javascript statement that uses the "effects" library to show the "Loading..." -span tag. Similarly, ClientSide.OnComplete property -value contains the javascript statement that hides the "Loading..." span tag. -See TCallbackClientSide for -further details on client-side property details. -

-- cgit v1.2.3