From 6394a6ffe3a9f3e4e698603b94503dc96f1e2652 Mon Sep 17 00:00:00 2001
From: "ctrlaltca@gmail.com" <>
Date: Thu, 2 Jun 2011 16:06:37 +0000
Subject: upported documentation changes to trunk/
---
.gitattributes | 21 ++++
buildscripts/texbuilder/quickstart/pages.php | 7 ++
.../pages/ActiveControls/ActiveCheckBoxList.page | 32 ++++++
.../pages/ActiveControls/ActiveDropDownList.page | 32 ++++++
.../pages/ActiveControls/ActiveListBox.page | 28 ++++++
.../ActiveControls/ActiveRadioButtonList.page | 32 ++++++
.../pages/ActiveControls/CallbackClientScript.page | 30 ++++++
.../pages/ActiveControls/CallbackClientSide.page | 79 +++++++++++++++
.../pages/ActiveControls/CallbackOptions.page | 52 ++++++++++
.../protected/pages/ActiveControls/Home.page | 24 ++---
.../Samples/TActiveCheckBoxList/Home.page | 66 +++++++++++++
.../Samples/TActiveCheckBoxList/Home.php | 26 +++++
.../Samples/TActiveDropDownList/Home.page | 108 +++++++++++++++++++++
.../Samples/TActiveDropDownList/Home.php | 60 ++++++++++++
.../Samples/TActiveListBox/Home.page | 108 +++++++++++++++++++++
.../ActiveControls/Samples/TActiveListBox/Home.php | 60 ++++++++++++
.../Samples/TActiveRadioButtonList/Home.page | 66 +++++++++++++
.../Samples/TActiveRadioButtonList/Home.php | 26 +++++
.../Samples/TCallbackClientScript/Home.page | 39 ++++++++
.../Samples/TCallbackClientScript/Home.php | 29 ++++++
.../Samples/TCallbackClientSide/Home.page | 73 ++++++++++++++
.../Samples/TCallbackClientSide/Home.php | 12 +++
.../Samples/TCallbackOptions/Home.page | 77 +++++++++++++++
.../Samples/TCallbackOptions/Home.php | 12 +++
.../Web/UI/ActiveControls/TCallbackClientSide.php | 11 +--
25 files changed, 1092 insertions(+), 18 deletions(-)
create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveCheckBoxList.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveDropDownList.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveListBox.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveRadioButtonList.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/CallbackClientScript.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/CallbackClientSide.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/CallbackOptions.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.php
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.php
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.php
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.php
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page
create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php
diff --git a/.gitattributes b/.gitattributes
index 122e33ea..bad4024e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1288,21 +1288,28 @@ demos/quickstart/protected/index/quickstart/deletable -text
demos/quickstart/protected/index/quickstart/segments -text
demos/quickstart/protected/pages/ActiveControls/ActiveButton.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveCheckBox.page -text
+demos/quickstart/protected/pages/ActiveControls/ActiveCheckBoxList.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveDataGrid.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveDataList.page -text
+demos/quickstart/protected/pages/ActiveControls/ActiveDropDownList.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveHyperLink.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveImage.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveImageButton.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveLabel.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveLinkButton.page -text
+demos/quickstart/protected/pages/ActiveControls/ActiveListBox.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveMultiView.page -text
demos/quickstart/protected/pages/ActiveControls/ActivePager.page -text
demos/quickstart/protected/pages/ActiveControls/ActivePanel.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveRadioButton.page -text
+demos/quickstart/protected/pages/ActiveControls/ActiveRadioButtonList.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveRepeater.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveTextBox.page -text
demos/quickstart/protected/pages/ActiveControls/AutoComplete.page -text
+demos/quickstart/protected/pages/ActiveControls/CallbackClientScript.page -text
+demos/quickstart/protected/pages/ActiveControls/CallbackClientSide.page -text
+demos/quickstart/protected/pages/ActiveControls/CallbackOptions.page -text
demos/quickstart/protected/pages/ActiveControls/DragDrop.page -text
demos/quickstart/protected/pages/ActiveControls/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Introduction.page -text
@@ -1314,6 +1321,8 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDataGrid/Sample1.page -text
@@ -1328,6 +1337,8 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDataGrid/Sample5.
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDataGrid/Sample5.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDataList/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDataList/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/hello_world.gif -text
@@ -1343,6 +1354,8 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.page -
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLinkButton/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLinkButton/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveMultiView/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveMultiView/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page -text
@@ -1350,6 +1363,8 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page -
demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRepeater/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTableRow/Home.page -text
@@ -1358,6 +1373,12 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.page
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.php -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/config.xml -text
demos/quickstart/protected/pages/ActiveControls/TActiveButtonClass.png -text
demos/quickstart/protected/pages/ActiveControls/TActiveButtonClass.vsd -text
diff --git a/buildscripts/texbuilder/quickstart/pages.php b/buildscripts/texbuilder/quickstart/pages.php
index d7191c07..28953831 100644
--- a/buildscripts/texbuilder/quickstart/pages.php
+++ b/buildscripts/texbuilder/quickstart/pages.php
@@ -105,21 +105,28 @@ $pages['Control Reference : Data Controls'] = array(
$pages['Control Reference : Active Controls (AJAX)'] = array(
'ActiveControls/ActiveButton.page',
'ActiveControls/ActiveCheckBox.page',
+ 'ActiveControls/ActiveCheckBoxList.page',
'ActiveControls/ActiveCustomValidator.page',
'ActiveControls/ActiveDataList.page',
'ActiveControls/ActiveDataGrid.page',
+ 'ActiveControls/ActiveDropDownList.page',
'ActiveControls/ActiveHyperLink.page',
'ActiveControls/ActiveImage.page',
'ActiveControls/ActiveImageButton.page',
'ActiveControls/ActiveLabel.page',
'ActiveControls/ActiveLinkButton.page',
+ 'ActiveControls/ActiveListBox.page',
'ActiveControls/ActiveMultiView.page',
'ActiveControls/ActivePager.page',
'ActiveControls/ActivePanel.page',
'ActiveControls/ActiveRadioButton.page',
+ 'ActiveControls/ActiveRadioButtonList.page',
'ActiveControls/ActiveRepeater.page',
'ActiveControls/ActiveTextBox.page',
'ActiveControls/AutoComplete.page',
+ 'ActiveControls/CallbackClientScript.page',
+ 'ActiveControls/CallbackClientSide.page',
+ 'ActiveControls/CallbackOptions.page',
'ActiveControls/DragDrop.page');
$pages['Active Control Overview'] = array(
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBoxList.page b/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBoxList.page
new file mode 100644
index 00000000..2560ece5
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/ActiveCheckBoxList.page
@@ -0,0 +1,32 @@
+
+
+TActiveCheckBoxList
+
+
+
+TActiveCheckBoxList is the active counterpart to the original TCheckBoxList control.
+
+
+
+The AutoPostBack property is set to true by default.
+Thus, when a checkbox is clicked a OnCallback event is
+raised after OnSelectedIndexChanged event.
+
+
+
+With ActiveControl.EnabledUpdate
+set to true (default is true), changes to the selection will be updated
+on the client side.
+
+
+
+List items can not be changed dynamically during a callback request.
+
+
+
+Please refer to the original documentation of TCheckBoxList for usage.
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveDropDownList.page b/demos/quickstart/protected/pages/ActiveControls/ActiveDropDownList.page
new file mode 100644
index 00000000..4400c552
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/ActiveDropDownList.page
@@ -0,0 +1,32 @@
+
+
+TActiveDropDownList
+
+
+
+TActiveDropDownList is the active counterpart to the original TDropDownList control.
+
+
+
+The AutoPostBack property is set to true by default.
+Thus, when the drop down list selection is changed the OnCallback event is
+raised after OnSelectedIndexChanged event.
+
+
+
+With ActiveControl.EnabledUpdate
+set to true (default is true), changes to the selection, after OnLoad event has
+been raised, will be updated on the client side.
+
+
+
+List items can be changed dynamically during a callback request.
+
+
+
+Please refer to the original documentation of TDropDownList for usage.
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveListBox.page b/demos/quickstart/protected/pages/ActiveControls/ActiveListBox.page
new file mode 100644
index 00000000..802c9fb1
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/ActiveListBox.page
@@ -0,0 +1,28 @@
+
+
+TActiveListBox
+
+
+
+TActiveListBox is the active counterpart to the original TListBox control.
+
+
+
+The AutoPostBack property is set to true by default.
+Thus, when a list item is clicked a OnCallback event is
+raised after OnSelectedIndexChanged event.
+
+
+
+With ActiveControl.EnabledUpdate
+set to true (default is true), changes to the selection will be updated
+on the client side.
+
+
+
+Please refer to the original documentation of TListBox for usage.
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveRadioButtonList.page b/demos/quickstart/protected/pages/ActiveControls/ActiveRadioButtonList.page
new file mode 100644
index 00000000..6095a9d3
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/ActiveRadioButtonList.page
@@ -0,0 +1,32 @@
+
+
+TActiveRadioButtonList
+
+
+
+TActiveRadioButtonList is the active counterpart to the original TRadioButtonList control.
+
+
+
+The AutoPostBack property is set to true by default.
+Thus, when a radio button is clicked a OnCallback event is
+raised after OnSelectedIndexChanged event.
+
+
+
+With ActiveControl.EnabledUpdate
+set to true (default is true), changes to the selection will be updated
+on the client side.
+
+
+
+List items can not be changed dynamically during a callback request.
+
+
+
+Please refer to the original documentation of TRadioButtonList for usage.
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/CallbackClientScript.page b/demos/quickstart/protected/pages/ActiveControls/CallbackClientScript.page
new file mode 100644
index 00000000..7ffd2db9
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/CallbackClientScript.page
@@ -0,0 +1,30 @@
+
+
+TCallbackClientScript
+
+
+
+The TCallbackClientScript class provides corresponding methods that can be
+executed on the client-side (i.e. the browser client that is viewing
+the page) during a callback response.
+For a complete list of available client side methods, consult the
+
+
+
+
+The available methods includes setting/clicking input elements, changing Css
+styles, hiding/showing elements, and adding visual effects to elements on the
+page. The client-side methods can be access through the CallbackClient
+property available in TPage.
+
+
+
+For example, to hide "$myTextBox" element during callback response, do:
+
+
+$this->getPage()->getCallbackClient()->hide($myTextBox);
+
+
+
+
+$Id: CallbackClientSide.page -1 $
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/CallbackClientSide.page b/demos/quickstart/protected/pages/ActiveControls/CallbackClientSide.page
new file mode 100644
index 00000000..c8e52585
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/CallbackClientSide.page
@@ -0,0 +1,79 @@
+
+
+TCallbackClientSide
+
+
+
+TCallbackClientSide is used to specify client-side callback request options and client-side event handlers.
+Each active control that inherits from TActiveBaseCallbackControl has a ClientSide property.
+The ClientSide property is an instance TCallbackClientSide containing the actual options and event handlers
+that are used by the client-side when that control is 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>
+
+
+Events
+
+
+The following client side events are executing in order if the callback
+request and response are send and received successfuly.
+
+
+
+ - onPreDispatch: executed before a request is dispatched;
+ - onUninitialized: executed when callback request is uninitialized;
+ - onLoading* : executed when callback request is initiated;
+ - onLoaded* : executed when callback request begins;
+ - onInteractive: executed when callback request is in progress;
+ - onComplete: executed when callback response returns;
+ - onSuccess executed when callback request returns and is successful;
+ - onFailure executed when callback request fails (only for communication errors);
+ - onException raised when callback request fails due to request/response errors.
+
+
+
+* Note that theses 2 events are not fired correctly by Opera. To make
+ them work in this browser, Prado will fire them just after onPreDispatch.
+
+
+
+In a general way, onUninitialized, onLoading, onLoaded and onInteractive events
+are not implemented consistently in all browsers. When cross browser compatibility is
+needed, it is best to avoid use them.
+
The OnSuccess and OnFailure events are raised when the
+response is returned. A successful request/response will raise
+OnSuccess event otherwise OnFailure will be raised.
+
+
+Properties
+
+
+The following properties can be used to change the way the callback request is performed.
+
+
+
+ - PostState: true to collect the form inputs and post them during callback (default: true);
+ - RequestTimeOut The request timeout in milliseconds (default: 30000, i.e. 30 seconds);
+ - HasPriority true to ensure that the callback request will be sent
+ immediately and will abort existing prioritized requests. It does not affect
+ callbacks that are not prioritized (default: true);
+ - EnablePageStateUpdate enable the callback response to enable the
+ viewstate update. This will automatically set HasPriority to true when enabled. (default: true).
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/CallbackOptions.page b/demos/quickstart/protected/pages/ActiveControls/CallbackOptions.page
new file mode 100644
index 00000000..184c116c
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/CallbackOptions.page
@@ -0,0 +1,52 @@
+
+
+TCallbackOptions
+
+
+
+TCallbackOptions allows a common set of callback client-side options
+to be attached to one or more active controls.
+This can be useful if a lot of active controls on the same page are sharing the same callback client-side options.
+Instead of specifying the same set of options again and again inside each control, these can be written once
+inside a TCallbackOptions; this TCallbackOptions can be then attached to each control using the
+ActiveControl.CallbackOptions property. For a full list of assignable properties, please check the
+TCallbackClientSide documentation.
+
+
+
+The typical scenario of use for a TCallbackOptions is a page where a lot of active controls needs to
+pause the user interaction with a "Please wait" style message until callback completion.
+First create a single TCallbackOptions control, assign it an ID and the the needed properties:
+
+
+
+<com:TCallbackOptions
+ ID="MyOptions"
+ ClientSide.OnLoading="... kindly inform the user that he should wait ..."
+ ClientSide.OnComplete="... callback completed, ready to serve the user again ..."
+/>
+
+
+
+Then, share this set of options to one or more active controls; each control will follow them:
+
+
+
+<com:TActiveButton
+ Text="simple button"
+ OnCallback="..."
+ ActiveControl.CallbackOptions="MyOptions"
+ ...
+/>
+
+<com:TActiveCheckBox
+ Text="simple checkbox"
+ OnCallback="..."
+ ActiveControl.CallbackOptions="MyOptions"
+ ...
+/>
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page
index 798bc267..7834cc1d 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Home.page
+++ b/demos/quickstart/protected/pages/ActiveControls/Home.page
@@ -97,36 +97,31 @@ TActiveButton control. See also the later part of the TCallbackOptions
- callback options such as OnLoading client-side event handlers.
-
-
Active List Controls
-
- * TActiveCheckBoxList
+ TActiveCheckBoxList
displays a list of checkboxes on a Web page and each checkbox
can trigger a callback request.
-
- * TActiveDropDownList
+ TActiveDropDownList
displays a dropdown list box that allows users to select a
single option from a few prespecified ones. It can be used
to perform a callback request.
-
- * TActiveListBox
+ TActiveListBox
displays a list box that allows single or multiple selection. It can be used
to perform a callback request.
-
- * TActiveRadioButtonList
+ TActiveRadioButtonList
is similar to TActiveCheckBoxList in every aspect except that each
TActiveRadioButtonList displays a group of radiobuttons. Each radio button
can perform a callback request.
@@ -387,14 +382,19 @@ realize the active controls.
-
- * TCallbackClientScript
+ TCallbackClientScript
methods to manipulate the client-side HTML elements, also includes methods
to invoke javascript Effects on HTML elements.
-
- * TCallbackClientSide
- common client-side callback request options, and client-side event handlers.
+ TCallbackClientSide
+ is used to specify client-side callback request options and client-side event handlers.
+
+
+ -
+ TCallbackOptions
+ allows a common set of callback client-side options to be attached to one or more active controls.
-
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.page
new file mode 100644
index 00000000..71b83c5a
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.page
@@ -0,0 +1,66 @@
+
+
+
TActiveCheckBoxList Samples
+
+
+
+
+
+Check box list with default settings:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+Check box list's behavior upon callback:
+ |
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+CheckBox List with Validation
+
+
+
+
+
+CheckBox list causing validation:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.php
new file mode 100644
index 00000000..3644721e
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.php
@@ -0,0 +1,26 @@
+SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$input->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
+ }
+ if($result==='')
+ $output->Text='Your selection is empty.';
+ else
+ $output->Text='Your selection is: '.$result;
+ }
+
+ public function selectionChanged($sender,$param)
+ {
+ $this->collectSelectionResult($this->CheckBoxList,$this->SelectionResult);
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.page
new file mode 100644
index 00000000..90ba4ea3
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.page
@@ -0,0 +1,108 @@
+
+
+TActiveDropDownList Samples
+
+
+
+
+
+Callback dropdown list:
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+Changing items to DropDown Lists on callback
+
+
+
+
+
+Adding an item on every callback:
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+Clearing / restoring the dropdownlist on callback:
+ |
+
+
+
+
+
+ |
+
+
+
+
+List Boxes with Validation
+
+
+
+
+
+Dropdown list is being validated:
+ |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+Dropdown list causing validation:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.php
new file mode 100644
index 00000000..0ba728c6
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.php
@@ -0,0 +1,60 @@
+IsPostBack && !$this->IsCallback)
+ {
+ $this->resetClicked(null,null);
+ }
+ }
+
+ protected function collectSelectionResult($input,$output)
+ {
+ $indices=$input->SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$input->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
+ }
+ if($result==='')
+ $output->Text='Your selection is empty.';
+ else
+ $output->Text='Your selection is: '.$result;
+ }
+
+ public function selectionChanged($sender,$param)
+ {
+ $this->collectSelectionResult($sender,$this->SelectionResult);
+ }
+
+ public function buttonClicked($sender, $param)
+ {
+ $data=array();
+ for($i = 0; $i <= $this->ddl1->Items->Count; $i++)
+ $data[$i]="Item number #".$i;
+ $this->ddl1->DataSource=$data;
+ $this->ddl1->dataBind();
+ $this->label1->Text="Total ".count($data)." items";
+ }
+
+ public function resetClicked($sender, $param)
+ {
+ $data=array('item 1','item 2','item 3','item 4');
+ $this->ddl2->DataSource=$data;
+ $this->ddl2->dataBind();
+ $this->label2->Text="DropDownList has been reset";
+ }
+
+ public function clearClicked($sender, $param)
+ {
+ $this->ddl2->DataSource=array();
+ $this->ddl2->dataBind();
+ $this->label2->Text="DropDownList cleared";
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.page
new file mode 100644
index 00000000..b23b644d
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.page
@@ -0,0 +1,108 @@
+
+
+TActiveListBox Samples
+
+
+
+
+
+Callback listbox:
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+Changing items to a Listbox on callback
+
+
+
+
+
+Adding an item on every callback:
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+Clearing / restoring the listbox on callback:
+ |
+
+
+
+
+
+ |
+
+
+
+
+List Boxes with Validation
+
+
+
+
+
+Listbox is being validated:
+ |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+Listbox causing validation:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php
new file mode 100644
index 00000000..5ec96613
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php
@@ -0,0 +1,60 @@
+IsPostBack && !$this->IsCallback)
+ {
+ $this->resetClicked(null,null);
+ }
+ }
+
+ protected function collectSelectionResult($input,$output)
+ {
+ $indices=$input->SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$input->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
+ }
+ if($result==='')
+ $output->Text='Your selection is empty.';
+ else
+ $output->Text='Your selection is: '.$result;
+ }
+
+ public function selectionChanged($sender,$param)
+ {
+ $this->collectSelectionResult($sender,$this->SelectionResult);
+ }
+
+ public function buttonClicked($sender, $param)
+ {
+ $data=array();
+ for($i = 0; $i <= $this->box1->Items->Count; $i++)
+ $data[$i]="Item number #".$i;
+ $this->box1->DataSource=$data;
+ $this->box1->dataBind();
+ $this->label1->Text="Total ".count($data)." items";
+ }
+
+ public function resetClicked($sender, $param)
+ {
+ $data=array('item 1','item 2','item 3','item 4');
+ $this->box2->DataSource=$data;
+ $this->box2->dataBind();
+ $this->label2->Text="ListBox has been reset";
+ }
+
+ public function clearClicked($sender, $param)
+ {
+ $this->box2->DataSource=array();
+ $this->box2->dataBind();
+ $this->label2->Text="ListBox cleared";
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.page
new file mode 100644
index 00000000..1e3a185f
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.page
@@ -0,0 +1,66 @@
+
+
+TActiveRadioButtonList Samples
+
+
+
+
+
+Check box list with default settings:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+Check box list's behavior upon callback:
+ |
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+RadioButton List with Validation
+
+
+
+
+
+RadioButton list causing validation:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.php
new file mode 100644
index 00000000..dfa52ce4
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.php
@@ -0,0 +1,26 @@
+SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$input->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
+ }
+ if($result==='')
+ $output->Text='Your selection is empty.';
+ else
+ $output->Text='Your selection is: '.$result;
+ }
+
+ public function selectionChanged($sender,$param)
+ {
+ $this->collectSelectionResult($this->RadioButtonList,$this->SelectionResult);
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page
new file mode 100644
index 00000000..49baa47c
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page
@@ -0,0 +1,39 @@
+
+TCallbackClientScript Samples
+
+
+ Choose an action from the list and click the button; the server-side php code will get the selected value and
+ force the execution of some clientside js code in the callback response.
+
+
+Actions
+
+
+
+
+
+
+
+
+
+
+Results
+
+
+
+ Checkbox 1: |
+ |
+
+
+ Label 1: |
+ |
+
+
+ TextBox 1: |
+ |
+
+
+
+
+
+$Id: Home.page -1 $
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php
new file mode 100644
index 00000000..500d7987
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php
@@ -0,0 +1,29 @@
+radio1->SelectedValue)
+ {
+ case 1:
+ $this->getCallbackClient()->evaluateScript("");
+ break;
+ case 2:
+ $this->getCallbackClient()->check($this->check1, !$this->check1->Checked);
+ break;
+ case 3:
+ $this->getCallbackClient()->hide($this->label1);
+ break;
+ case 4:
+ $this->getCallbackClient()->show($this->label1);
+ break;
+ case 5:
+ $this->getCallbackClient()->focus($this->txt1);
+ break;
+ }
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page
new file mode 100644
index 00000000..4540dd91
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page
@@ -0,0 +1,73 @@
+
+TCallbackClientSide Samples
+
+
+
+
+A callback button with attached client side options:
+ |
+
+
+
+ please wait 5 seconds for the callback to complete...
+callback completed!
+ |
+
+
+A callback button logging all callback events (5 seconds delay):
+ |
+
+
+
+
+ |
+
+
+A callback with RequestTimeout="3000" (3 seconds). Since the callback will take 5 seconds to complete, the clientside will timeout.
+This will cause a "missing page state" error; note that the callback is not considered failed, since no
+connection error has occured.
+ |
+
+
+
+
+ |
+
+
+
+
+
+$Id: Home.page -1 $
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.php
new file mode 100644
index 00000000..8dd794fe
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page
new file mode 100644
index 00000000..9cc2f155
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page
@@ -0,0 +1,77 @@
+
+TCallbackOptions Samples
+
+
+
+
+A callback button with attached client side options:
+ |
+
+
+ please wait 5 seconds for the callback to complete...
+callback completed!
+ |
+
+
+Same example as before, but this time interacting with another Prado control:
+ |
+
+
+
+ |
+
+
+The same TCallbackOptions can be shared among different controls, even of different types:
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+$Id$
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php
new file mode 100644
index 00000000..6f101107
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientSide.php b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
index 31b806c3..cc3b9449 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientSide.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
@@ -22,6 +22,9 @@
* - onLoaded* executed when callback request begins.
* - onInteractive executed when callback request is in progress.
* - onCompleteexecuted when callback response returns.
+ * - onSuccess executed when callback request returns and is successful.
+ * - onFailure executed when callback request returns and fails.
+ * - onException raised when callback request fails due to request/response errors.
*
* * Note that theses 2 events are not fired correctly by Opera. To make
* them work in this browser, Prado will fire them just after onPreDispatch.
@@ -29,22 +32,18 @@
* In a general way, onUninitialized, onLoading, onLoaded and onInteractive events
* are not implemented consistently in all browsers.When cross browser compatibility is
* needed, it is best to avoid use them
- *
+ *
* The OnSuccess and OnFailure events are raised when the
* response is returned. A successful request/response will raise
* OnSuccess event otherwise OnFailure will be raised.
*
- * - onSuccess executed when callback request returns and is successful.
- * - onFailure executed when callback request returns and fails.
- * - onException raised when callback request fails due to request/response errors.
- *
* - PostState true to collect the form inputs and post them during callback, default is true.
* - RequestTimeOut The request timeout in milliseconds.
* - HasPriority true to ensure that the callback request will be sent
* immediately and will abort existing prioritized requests. It does not affect
* callbacks that are not prioritized.
* - EnablePageStateUpdate enable the callback response to enable the
- * viewstate update. This will automatically set HasPrority to true when enabled.
+ * viewstate update. This will automatically set HasPriority to true when enabled.
*
* @author Wei Zhuo
* @version $Id$
--
cgit v1.2.3