From 45b0fe42a979d444d547a5248eb2e9e915aaf16a Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 14 Jan 2007 02:10:24 +0000 Subject: Add "block-content" to allow user comments on block level elements in quickstart docs. --- .../pages/ActiveControls/ActiveButton.page | 30 +++++++++++----------- .../pages/ActiveControls/ActiveCheckBox.page | 6 ++--- .../ActiveControls/ActiveCustomValidator.page | 6 ++--- .../protected/pages/ActiveControls/Home.page | 30 +++++++++++----------- .../pages/ActiveControls/Introduction.page | 2 +- 5 files changed, 37 insertions(+), 37 deletions(-) (limited to 'demos/quickstart/protected/pages/ActiveControls') diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page b/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page index adf50d22..c80c22dc 100644 --- a/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveButton.page @@ -1,9 +1,9 @@ -

TActiveButton

+

TActiveButton

-

TActiveButton is the active control counter part to +

TActiveButton is the active control counter part to TButton. When a TActiveButton is clicked, rather than a normal post back request a callback request is initiated. The OnCallback event is raised @@ -11,29 +11,29 @@ during a callback request and it is raise after the OnClick event.

-

When the ActiveControl.EnableUpdate property is true, +

When the ActiveControl.EnableUpdate property is true, changing the Text property during a callback request will update the button's caption on the client-side.

-

Since the OnCallback event is raised only during a callback request, +

Since the OnCallback event is raised only during a callback request, the OnCallback event handler can be used to handle logic specifically related to callback requests. The OnClick event handler is raised when ever the button is clicked, even if javascript is disabled.

-

The following example the use of both the OnClick and OnCallback +

The following example the use of both the OnClick and OnCallback events of an TActiveButton.

-

TActiveButton Class Diagram

-

The class diagram for TActiveButton is illustrated in the figure below. +

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 +

TActiveButton is an extension of TButton and implements two additional interfaces ICallbackEventHandler and IActiveControl. The TActiveButton contains an instance of TBaseActiveCallbackControl @@ -41,24 +41,24 @@ 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 +

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

+

Adding Client Side Behaviour

-

With in the ActiveControl property is an instance of +

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, @@ -68,7 +68,7 @@ The following example demonstrates the toggling of a "loading" indicator when the client-side is making a callback request.

- + <com:TClientSide PradoScripts="effects" /> Loading... @@ -82,7 +82,7 @@ when the client-side is making a callback request. </com:TActiveButton> -

The example loads the "effects" javascript library using the +

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..." diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBox.page b/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBox.page index d66c48f5..5b34492a 100644 --- a/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBox.page +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBox.page @@ -1,9 +1,9 @@ -

TActiveCheckBox

+

TActiveCheckBox

-

+

TActiveCheckBox is the active control counter part to TCheckbox. The AutoPostBack property of TActiveCheckBox is set to true by default. @@ -11,7 +11,7 @@ OnCallback event is raise after the OnCheckedChanged event.

-

+

The Text and Checked properties of TActiveCheckBox can be changed during a callback request. The TextAlign property of TActiveCheckBox can not be changed during diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page b/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page index f97ea40d..d723cbac 100644 --- a/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page @@ -1,15 +1,15 @@ -

TActiveCustomValidator

+

TActiveCustomValidator

-

Performs custom validation using only server-side OnServerValidate +

Performs custom validation using only server-side OnServerValidate validation event. The client-side uses callbacks to raise onServerValidate event. The ClientValidationFunction property is disabled and will throw an exception if trying to set this property.

-

Beware that the onServerValidate may be +

Beware that the onServerValidate may be raised when the control to validate on the client side changes value, that is, the server validation may be called many times. diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page index 5b8c40a2..289c7c1c 100644 --- a/demos/quickstart/protected/pages/ActiveControls/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Home.page @@ -1,7 +1,7 @@ -

Active Controls (AJAX enabled Controls)

-

See the Introduction +

Active Controls (AJAX enabled Controls)

+

See the Introduction for a quick overview of the concept behind active controls (AJAX enabled controls). Most active controls have a property of ActiveControl and @@ -13,14 +13,14 @@ during a callback request. Active controls is reliant on a collection of javascript classes.

-

For a quick demo of active controls, try the +

For a quick demo of active controls, try the TActiveButton control. See also the later part of the Current Converter tutorial for a more indepth example.

-

* the tutorial for this control is not completed yet.

+

* the tutorial for this control is not completed yet.

-

Standard Active Controls

-