summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-02 16:06:37 +0000
committerctrlaltca@gmail.com <>2011-06-02 16:06:37 +0000
commit6394a6ffe3a9f3e4e698603b94503dc96f1e2652 (patch)
tree26dfde346742329d064d336936edf20fdb7cb81e /demos/quickstart/protected/pages/ActiveControls
parentb9f9a16d7eefc48ac489c8cb2b87749459bb3d38 (diff)
upported documentation changes to trunk/
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/ActiveCheckBoxList.page32
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/ActiveDropDownList.page32
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/ActiveListBox.page28
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/ActiveRadioButtonList.page32
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/CallbackClientScript.page30
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/CallbackClientSide.page79
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/CallbackOptions.page52
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Home.page24
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.page66
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBoxList/Home.php26
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.page108
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDropDownList/Home.php60
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.page108
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php60
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.page66
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList/Home.php26
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page39
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php29
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page73
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.php12
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page77
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php12
22 files changed, 1059 insertions, 12 deletions
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 @@
+<com:TContent ID="body" >
+
+<h1>TActiveCheckBoxList</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveCheckBoxList" />
+
+<p class="block-content">
+<tt>TActiveCheckBoxList</tt> is the active counterpart to the original <tt>TCheckBoxList</tt> control.
+</p>
+
+<p class="block-content">
+The <tt>AutoPostBack</tt> property is set to true by default.
+Thus, when a checkbox is clicked a <tt>OnCallback</tt> event is
+raised after <tt>OnSelectedIndexChanged</tt> event.
+</p>
+
+<p class="block-content">
+With <tt>ActiveControl.EnabledUpdate</tt>
+set to true (default is true), changes to the selection will be updated
+on the client side.
+</p>
+
+<p class="block-content">
+List items can <b>not</b> be changed dynamically during a callback request.
+</p>
+
+<p class="block-content">
+Please refer to the original documentation of <a href="?page=Controls.List">TCheckBoxList</a> for usage.
+</p>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActiveCheckBoxList.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<com:TContent ID="body" >
+
+<h1>TActiveDropDownList</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveDropDownList" />
+
+<p class="block-content">
+<tt>TActiveDropDownList</tt> is the active counterpart to the original <tt>TDropDownList</tt> control.
+</p>
+
+<p class="block-content">
+The <tt>AutoPostBack</tt> property is set to true by default.
+Thus, when the drop down list selection is changed the <tt>OnCallback</tt> event is
+raised after <tt>OnSelectedIndexChanged</tt> event.
+</p>
+
+<p class="block-content">
+With <tt>ActiveControl.EnabledUpdate</tt>
+set to true (default is true), changes to the selection, <b>after</b> OnLoad event has
+been raised, will be updated on the client side.
+</p>
+
+<p class="block-content">
+List items can be changed dynamically during a callback request.
+</p>
+
+<p class="block-content">
+Please refer to the original documentation of <a href="?page=Controls.List">TDropDownList</a> for usage.
+</p>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActiveDropDownList.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<com:TContent ID="body" >
+
+<h1>TActiveListBox</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveListBox" />
+
+<p class="block-content">
+<tt>TActiveListBox</tt> is the active counterpart to the original <tt>TListBox</tt> control.
+</p>
+
+<p class="block-content">
+The <tt>AutoPostBack</tt> property is set to true by default.
+Thus, when a list item is clicked a <tt>OnCallback</tt> event is
+raised after <tt>OnSelectedIndexChanged</tt> event.
+</p>
+
+<p class="block-content">
+With <tt>ActiveControl.EnabledUpdate</tt>
+set to true (default is true), changes to the selection will be updated
+on the client side.
+</p>
+
+<p class="block-content">
+Please refer to the original documentation of <a href="?page=Controls.List">TListBox</a> for usage.
+</p>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActiveListBox.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<com:TContent ID="body" >
+
+<h1>TActiveRadioButtonList</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveRadioButtonList" />
+
+<p class="block-content">
+<tt>TActiveRadioButtonList</tt> is the active counterpart to the original <tt>TRadioButtonList</tt> control.
+</p>
+
+<p class="block-content">
+The <tt>AutoPostBack</tt> property is set to true by default.
+Thus, when a radio button is clicked a <tt>OnCallback</tt> event is
+raised after <tt>OnSelectedIndexChanged</tt> event.
+</p>
+
+<p class="block-content">
+With <tt>ActiveControl.EnabledUpdate</tt>
+set to true (default is true), changes to the selection will be updated
+on the client side.
+</p>
+
+<p class="block-content">
+List items can <b>not</b> be changed dynamically during a callback request.
+</p>
+
+<p class="block-content">
+Please refer to the original documentation of <a href="?page=Controls.List">TRadioButtonList</a> for usage.
+</p>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActiveRadioButtonList.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<com:TContent ID="body" >
+
+<h1>TCallbackClientScript</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TCallbackClientScript" />
+
+<p class="block-content">
+The <tt>TCallbackClientScript</tt> 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
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TCallbackClientScript" />
+</p>
+
+<p class="block-content">
+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 <tt>CallbackClient</tt>
+property available in <tt>TPage</tt>.
+</p>
+
+<p class="block-content">
+For example, to hide "$myTextBox" element during callback response, do:
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source block-content">
+$this->getPage()->getCallbackClient()->hide($myTextBox);
+</com:TTextHighlighter>
+
+<com:RunBar PagePath="ActiveControls.Samples.TCallbackClientScript.Home" />
+
+<div class="last-modified">$Id: CallbackClientSide.page -1 $</div></com:TContent> \ 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 @@
+<com:TContent ID="body" >
+
+<h1>TCallbackClientSide</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TCallbackClientSide" />
+
+<p class="block-content">
+<tt>TCallbackClientSide</tt> is used to specify client-side callback request options and client-side event handlers.
+Each active control that inherits from <tt>TActiveBaseCallbackControl</tt> has a ClientSide property.
+The ClientSide property is an instance <tt>TCallbackClientSide</tt> 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.
+</p>
+
+<com:TTextHighlighter Language="prado" CssClass="source block-content">
+&lt;com:TClientScript PradoScripts="effects" /&gt;
+<span id="callback_status">Loading...</span>
+
+&lt;com:TActiveButton
+ Text="Click Me"
+ OnCallback="button_callback"
+ ActiveControl.CallbackParameter="value" &gt;
+ &lt;prop:ClientSide
+ OnLoading="Element.show('callback_status')"
+ OnComplete="Element.hide('callback_status')" /&gt;
+&lt;/com:TActiveButton&gt;
+</com:TTextHighlighter>
+
+<h3>Events</h3>
+
+<p class="block-content">
+The following client side events are executing in order if the callback
+request and response are send and received successfuly.
+</p>
+
+<ul>
+ <li><tt>onPreDispatch</tt>: executed before a request is dispatched;</li>
+ <li><tt>onUninitialized</tt>: executed when callback request is uninitialized;</li>
+ <li><tt>onLoading</tt>* : executed when callback request is initiated;</li>
+ <li><tt>onLoaded</tt>* : executed when callback request begins;</li>
+ <li><tt>onInteractive</tt>: executed when callback request is in progress;</li>
+ <li><tt>onComplete</tt>: executed when callback response returns;</li>
+ <li><tt>onSuccess</tt> executed when callback request returns and is successful;</li>
+ <li><tt>onFailure</tt> executed when callback request fails (only for communication errors);</li>
+ <li><tt>onException</tt> raised when callback request fails due to request/response errors.</li>
+</ul>
+
+<p class="block-content">
+* Note that theses 2 events are not fired correctly by Opera. To make
+ them work in this browser, Prado will fire them just after <tt>onPreDispatch</tt>.
+</p>
+
+<p class="block-content">
+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.
+<br/>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.
+</p>
+
+<h3>Properties</h3>
+
+<p class="block-content">
+The following properties can be used to change the way the callback request is performed.
+</p>
+
+<ul>
+ <li><tt>PostState</tt>: true to collect the form inputs and post them during callback (default: true);</li>
+ <li><tt>RequestTimeOut</tt> The request timeout in milliseconds (default: 30000, i.e. 30 seconds);</li>
+ <li><tt>HasPriority</tt> 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);</li>
+ <li><tt>EnablePageStateUpdate</tt> enable the callback response to enable the
+ viewstate update. This will automatically set HasPriority to true when enabled. (default: true).</li>
+</ul>
+
+<com:RunBar PagePath="ActiveControls.Samples.TCallbackClientSide.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<com:TContent ID="body" >
+
+<h1 id="154012">TCallbackOptions</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TCallbackOptions" />
+
+<p class="block-content">
+<tt>TCallbackOptions</tt> 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 <tt>TCallbackOptions</tt>; this <tt>TCallbackOptions</tt> can be then attached to each control using the
+<tt>ActiveControl.CallbackOptions</tt> property. For a full list of assignable properties, please check the
+<a href="?page=ActiveControls.CallbackClientSide">TCallbackClientSide</a> documentation.
+</p>
+
+<p class="block-content">
+The typical scenario of use for a <tt>TCallbackOptions</tt> 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 <tt>TCallbackOptions</tt> control, assign it an ID and the the needed properties:
+</p>
+
+<com:TTextHighlighter Language="text" CssClass="source block-content" >
+&lt;com:TCallbackOptions
+ ID="MyOptions"
+ ClientSide.OnLoading="... kindly inform the user that he should wait ..."
+ ClientSide.OnComplete="... callback completed, ready to serve the user again ..."
+/&gt;
+</com:TTextHighlighter>
+
+<p class="block-content">
+Then, share this set of options to one or more active controls; each control will follow them:
+</p>
+
+<com:TTextHighlighter Language="text" CssClass="source block-content" >
+&lt;com:TActiveButton
+ Text="simple button"
+ OnCallback="..."
+ ActiveControl.CallbackOptions="MyOptions"
+ ...
+/&gt;
+
+&lt;com:TActiveCheckBox
+ Text="simple checkbox"
+ OnCallback="..."
+ ActiveControl.CallbackOptions="MyOptions"
+ ...
+/&gt;
+</com:TTextHighlighter>
+
+<com:RunBar PagePath="ActiveControls.Samples.TCallbackOptions.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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</a> control. See also the later part of the <a href="?page=Tutoria
It can be used to perform a callback request.
</li>
- <li>
- * <a href="?page=ActiveControls.CallbackOptions">TCallbackOptions</a>
- callback options such as <tt>OnLoading</tt> client-side event handlers.
- </li>
-
</ul>
<h2 id="128033">Active List Controls</h2>
<ul id="u2" class="block-content">
<li>
- * <a href="?page=ActiveControls.ActiveCheckBoxList">TActiveCheckBoxList</a>
+ <a href="?page=ActiveControls.ActiveCheckBoxList">TActiveCheckBoxList</a>
displays a list of checkboxes on a Web page and each checkbox
can trigger a callback request.
</li>
<li>
- * <a href="?page=ActiveControls.ActiveDropDownList">TActiveDropDownList</a>
+ <a href="?page=ActiveControls.ActiveDropDownList">TActiveDropDownList</a>
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.
</li>
<li>
- * <a href="?page=ActiveControls.ActiveListBox">TActiveListBox</a>
+ <a href="?page=ActiveControls.ActiveListBox">TActiveListBox</a>
displays a list box that allows single or multiple selection. It can be used
to perform a callback request.
</li>
<li>
- * <a href="?page=ActiveControls.ActiveRadioButtonList">TActiveRadioButtonList</a>
+ <a href="?page=ActiveControls.ActiveRadioButtonList">TActiveRadioButtonList</a>
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.</p>
</li>
<li>
- * <a href="?page=ActiveControls.CallbackClientScript">TCallbackClientScript</a>
+ <a href="?page=ActiveControls.CallbackClientScript">TCallbackClientScript</a>
methods to manipulate the client-side HTML elements, also includes methods
to invoke javascript Effects on HTML elements.
</li>
<li>
- * <a href="?page=ActiveControls.CallbackClientSide">TCallbackClientSide</a>
- common client-side callback request options, and client-side event handlers.
+ <a href="?page=ActiveControls.CallbackClientSide">TCallbackClientSide</a>
+ is used to specify client-side callback request options and client-side event handlers.
+ </li>
+
+ <li>
+ <a href="?page=ActiveControls.CallbackOptions">TCallbackOptions</a>
+ allows a common set of callback client-side options to be attached to one or more active controls.
</li>
<li>
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 @@
+<com:TContent ID="body">
+
+<h1>TActiveCheckBoxList Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Check box list with default settings:
+</td>
+<td class="sampleaction">
+<com:TActiveCheckBoxList>
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" Selected="true" />
+</com:TActiveCheckBoxList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Check box list's behavior upon callback:
+</td>
+<td class="sampleaction">
+<com:TActiveCheckBoxList ID="CheckBoxList" OnCallback="selectionChanged">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" Enabled="false" />
+ <com:TListItem Value="value 5" Text="item 5" Selected="true" />
+</com:TActiveCheckBoxList>
+<br/>
+<com:TActiveLabel ID="SelectionResult" ForeColor="red" />
+</td>
+</tr>
+
+</table>
+
+
+<h2>CheckBox List with Validation</h2>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+CheckBox list causing validation:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ ErrorMessage="You must enter a value"
+ Display="Dynamic"
+ ValidationGroup="Group2"
+ />
+<com:TActiveCheckBoxList ValidationGroup="Group2">
+ <com:TListItem Text="Agree" />
+ <com:TListItem Text="Disagree" />
+</com:TActiveCheckBoxList>
+</td>
+</tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<?php
+
+class Home extends TPage
+{
+ 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($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 @@
+<com:TContent ID="body">
+
+<h1>TActiveDropDownList Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Callback dropdown list:
+</td>
+<td class="sampleaction">
+<com:TActiveDropDownList
+ OnSelectedIndexChanged="selectionChanged">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+</com:TActiveDropDownList>
+<com:TActiveLabel ID="SelectionResult" ForeColor="red" />
+</td>
+</tr>
+
+</table>
+
+
+<h2>Changing items to DropDown Lists on callback</h2>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Adding an item on every callback:
+ </td>
+ <td class="sampleaction">
+ <com:TActiveDropDownList ID="ddl1" />
+ <com:TActiveButton ID="button1" Text="add a new item" OnCallback="buttonClicked" />
+ <com:TActiveLabel ID="label1" ForeColor="red" />
+ </td>
+</tr>
+
+</table>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Clearing / restoring the dropdownlist on callback:
+ </td>
+ <td class="sampleaction">
+ <com:TActiveDropDownList ID="ddl2" />
+ <com:TActiveButton ID="button2" Text="clear" OnCallback="clearClicked" />
+ <com:TActiveButton ID="button3" Text="reset" OnCallback="resetClicked" />
+ <com:TActiveLabel ID="label2" ForeColor="red" />
+ </td>
+</tr>
+
+</table>
+
+<h2>List Boxes with Validation</h2>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Dropdown list is being validated:
+</td>
+<td class="sampleaction">
+<com:TActiveDropDownList ID="VDropDownList1">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+</com:TActiveDropDownList>
+<com:TRequiredFieldValidator
+ ControlToValidate="VDropDownList1"
+ ErrorMessage="You must make a selection other than the first option"
+ InitialValue="value 1"
+ Display="Dynamic"
+ ValidationGroup="Group1"
+ />
+<com:TActiveButton Text="Submit" ValidationGroup="Group1" />
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Dropdown list causing validation:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ ErrorMessage="You must enter a value"
+ Display="Dynamic"
+ ValidationGroup="Group2"
+ />
+<com:TActiveDropDownList
+ ID="VDropDownList2"
+ ValidationGroup="Group2">
+ <com:TListItem Text="Agree" />
+ <com:TListItem Text="Disagree" />
+</com:TActiveDropDownList>
+</td>
+</tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<?php
+
+class Home extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->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 @@
+<com:TContent ID="body">
+
+<h1>TActiveListBox Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Callback listbox:
+</td>
+<td class="sampleaction">
+<com:TActiveListBox
+ OnSelectedIndexChanged="selectionChanged">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+</com:TActiveListBox>
+<com:TActiveLabel ID="SelectionResult" ForeColor="red" />
+</td>
+</tr>
+
+</table>
+
+
+<h2>Changing items to a Listbox on callback</h2>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Adding an item on every callback:
+ </td>
+ <td class="sampleaction">
+ <com:TActiveListBox ID="box1" />
+ <com:TActiveButton ID="button1" Text="add a new item" OnCallback="buttonClicked" />
+ <com:TActiveLabel ID="label1" ForeColor="red" />
+ </td>
+</tr>
+
+</table>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Clearing / restoring the listbox on callback:
+ </td>
+ <td class="sampleaction">
+ <com:TActiveListBox ID="box2" />
+ <com:TActiveButton ID="button2" Text="clear" OnCallback="clearClicked" />
+ <com:TActiveButton ID="button3" Text="reset" OnCallback="resetClicked" />
+ <com:TActiveLabel ID="label2" ForeColor="red" />
+ </td>
+</tr>
+
+</table>
+
+<h2>List Boxes with Validation</h2>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Listbox is being validated:
+</td>
+<td class="sampleaction">
+<com:TActiveListBox ID="VDropDownList1">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+</com:TActiveListBox>
+<com:TRequiredFieldValidator
+ ControlToValidate="VDropDownList1"
+ ErrorMessage="You must make a selection other than the first option"
+ InitialValue="value 1"
+ Display="Dynamic"
+ ValidationGroup="Group1"
+ />
+<com:TActiveButton Text="Submit" ValidationGroup="Group1" />
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Listbox causing validation:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ ErrorMessage="You must enter a value"
+ Display="Dynamic"
+ ValidationGroup="Group2"
+ />
+<com:TActiveListBox
+ ID="VDropDownList2"
+ ValidationGroup="Group2">
+ <com:TListItem Text="Agree" />
+ <com:TListItem Text="Disagree" />
+</com:TActiveListBox>
+</td>
+</tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<?php
+
+class Home extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->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 @@
+<com:TContent ID="body">
+
+<h1>TActiveRadioButtonList Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Check box list with default settings:
+</td>
+<td class="sampleaction">
+<com:TActiveRadioButtonList>
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" Selected="true" />
+</com:TActiveRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Check box list's behavior upon callback:
+</td>
+<td class="sampleaction">
+<com:TActiveRadioButtonList ID="RadioButtonList" OnCallback="selectionChanged">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" Enabled="false" />
+ <com:TListItem Value="value 5" Text="item 5" Selected="true" />
+</com:TActiveRadioButtonList>
+<br/>
+<com:TActiveLabel ID="SelectionResult" ForeColor="red" />
+</td>
+</tr>
+
+</table>
+
+
+<h2>RadioButton List with Validation</h2>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+RadioButton list causing validation:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ ErrorMessage="You must enter a value"
+ Display="Dynamic"
+ ValidationGroup="Group2"
+ />
+<com:TActiveRadioButtonList ValidationGroup="Group2">
+ <com:TListItem Text="Agree" />
+ <com:TListItem Text="Disagree" />
+</com:TActiveRadioButtonList>
+</td>
+</tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<?php
+
+class Home extends TPage
+{
+ 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($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 @@
+<com:TContent ID="body">
+<h1>TCallbackClientScript Samples</h1>
+
+<p>
+ 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.
+</p>
+
+<h2>Actions</h2>
+<com:TRadioButtonList ID="radio1">
+ <com:TListItem Value="1" Text="alert() me of something" />
+ <com:TListItem Value="2" Text="toggle Checkbox 1" />
+ <com:TListItem Value="3" Text="hide Label 1" />
+ <com:TListItem Value="4" Text="show Label 1" />
+ <com:TListItem Value="5" Text="focus TextBox 1" />
+</com:TRadioButtonList>
+
+<br/><com:TActiveButton ID="button1" OnCallback="buttonCallback" Text="callback!" />
+
+<h2>Results</h2>
+
+<table>
+ <tr>
+ <td>Checkbox 1:</td>
+ <td><com:TCheckBox ID="check1" Text="Checkbox 1" /></td>
+ </tr>
+ <tr>
+ <td>Label 1:</td>
+ <td><com:TLabel ID="label1" ForeColor="Red" Text="Text of Label 1" /></td>
+ </tr>
+ <tr>
+ <td>TextBox 1:</td>
+ <td><com:TTextBox ID="txt1" Text="Sample text" /></td>
+ </tr>
+</table>
+
+<com:TJavascriptLogger />
+
+<div class="last-modified">$Id: Home.page -1 $</div></com:TContent> \ 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 @@
+<?php
+
+// $Id: Home.php -1 $
+class Home extends TPage
+{
+ public function buttonCallback ($sender, $param)
+ {
+ switch($this->radio1->SelectedValue)
+ {
+ case 1:
+ $this->getCallbackClient()->evaluateScript("<script> alert('something'); </script>");
+ 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 @@
+<com:TContent ID="body">
+<h1>TCallbackClientSide Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A callback button with attached client side options:
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnCallback="buttonCallback"
+>
+ <prop:ClientSide
+ OnLoading="$('callback_status2').hide(); new Effect.BlindDown('callback_status', { duration: 1 });"
+ OnComplete="new Effect.BlindUp('callback_status', { duration: 1 }); $('callback_status2').show();"
+ />
+</com:TActiveButton>
+<div id="callback_status" style="display:none;">please wait 5 seconds for the callback to complete...</div>
+<div id="callback_status2" style="display:none;">callback completed!</div>
+</td></tr>
+
+<tr><td class="samplenote">
+A callback button logging all callback events (5 seconds delay):
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnCallback="buttonCallback"
+>
+ <prop:ClientSide
+ onPreDispatch = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onPreDispatch');"
+ onUninitialized = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onUninitialized');"
+ onLoading = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onLoading');"
+ onLoaded = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onLoaded');"
+ onInteractive = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onInteractive');"
+ onComplete = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onComplete');"
+ onSuccess = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onSuccess');"
+ onFailure = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onFailure');"
+ onException = "new Insertion.Bottom('<%= $this->label1->ClientID %>', '<br/>onException');"
+ />
+</com:TActiveButton>
+<br/><com:TLabel ID="label1" ForeColor="Red" Text="waiting for button click.." />
+</td></tr>
+
+<tr><td class="samplenote">
+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.
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnCallback="buttonCallback"
+>
+ <prop:ClientSide
+ onPreDispatch = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onPreDispatch');"
+ onUninitialized = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onUninitialized');"
+ onLoading = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onLoading');"
+ onLoaded = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onLoaded');"
+ onInteractive = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onInteractive');"
+ onComplete = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onComplete');"
+ onSuccess = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onSuccess');"
+ onFailure = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onFailure');"
+ onException = "new Insertion.Bottom('<%= $this->label2->ClientID %>', '<br/>onException');"
+ RequestTimeOut = "3000"
+ />
+</com:TActiveButton>
+<br/><com:TLabel ID="label2" ForeColor="Red" Text="waiting for button click.." />
+</td></tr>
+
+</table>
+
+<com:TJavascriptLogger />
+
+<div class="last-modified">$Id: Home.page -1 $</div></com:TContent> \ 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 @@
+<?php
+
+// $Id: Home.php -1 $
+class Home extends TPage
+{
+ public function buttonCallback ($sender, $param)
+ {
+ sleep(5);
+ }
+}
+
+?> \ 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 @@
+<com:TContent ID="body">
+<h1>TCallbackOptions Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A callback button with attached client side options:
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnCallback="buttonCallback"
+ ActiveControl.CallbackOptions="options"
+/>
+<com:TCallbackOptions
+ ID="options"
+ ClientSide.OnLoading="$('callback_status2').hide(); new Effect.BlindDown('callback_status', { duration: 1 });"
+ ClientSide.OnComplete="new Effect.BlindUp('callback_status', { duration: 1 }); $('callback_status2').show();"
+/>
+<div id="callback_status" style="display:none;">please wait 5 seconds for the callback to complete...</div>
+<div id="callback_status2" style="display:none;">callback completed!</div>
+</td></tr>
+
+<tr><td class="samplenote">
+Same example as before, but this time interacting with another Prado control:
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnCallback="buttonCallback"
+ ActiveControl.CallbackOptions="options2"
+/>
+<com:TCallbackOptions
+ ID="options2"
+ ClientSide.OnLoading="$('<%= $this->label1->ClientID %>').innerHTML='please wait 5 seconds for the callback to complete....';"
+ ClientSide.OnComplete="$('<%= $this->label1->ClientID %>').innerHTML='callback completed!';"
+/>
+<br/><com:TLabel ID="label1" ForeColor="Red" Text="waiting for button click.." />
+</td></tr>
+
+<tr><td class="samplenote">
+The same TCallbackOptions can be shared among different controls, even of different types:
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="simple button"
+ OnCallback="buttonCallback"
+ ActiveControl.CallbackOptions="options3"
+/>
+
+<br/><com:TActiveCheckBox
+ Text="simple checkbox"
+ OnCallback="buttonCallback"
+ ActiveControl.CallbackOptions="options3"
+/>
+
+<br/><com:TActiveDropDownList
+ OnCallback="buttonCallback"
+ ActiveControl.CallbackOptions="options3"
+>
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+</com:TActiveDropDownList>
+
+<br/><com:TLabel ID="label2" ForeColor="Red" Text="waiting for any control to callback.." />
+
+<com:TCallbackOptions
+ ID="options3"
+ ClientSide.OnLoading="$('<%= $this->label2->ClientID %>').innerHTML='please wait 5 seconds for the callback to complete....';"
+ ClientSide.OnComplete="$('<%= $this->label2->ClientID %>').innerHTML='callback completed!';"
+/>
+
+</td></tr>
+</table>
+
+<com:TJavascriptLogger />
+
+<div class="last-modified">$Id$</div></com:TContent> \ 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 @@
+<?php
+
+// $Id$
+class Home extends TPage
+{
+ public function buttonCallback ($sender, $param)
+ {
+ sleep(5);
+ }
+}
+
+?> \ No newline at end of file