summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes12
-rw-r--r--buildscripts/texbuilder/quickstart/pages.php4
-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/Home.page8
-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
15 files changed, 664 insertions, 4 deletions
diff --git a/.gitattributes b/.gitattributes
index 793e040e..6303ca7e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1273,18 +1273,22 @@ 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
@@ -1299,6 +1303,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
@@ -1313,6 +1319,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
@@ -1328,6 +1336,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
@@ -1335,6 +1345,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/TActiveTextBox/Home.page -text
diff --git a/buildscripts/texbuilder/quickstart/pages.php b/buildscripts/texbuilder/quickstart/pages.php
index 55ad18e8..2fe2438f 100644
--- a/buildscripts/texbuilder/quickstart/pages.php
+++ b/buildscripts/texbuilder/quickstart/pages.php
@@ -106,18 +106,22 @@ $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',
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/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page
index 798bc267..a658aa16 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Home.page
+++ b/demos/quickstart/protected/pages/ActiveControls/Home.page
@@ -107,26 +107,26 @@ TActiveButton</a> control. See also the later part of the <a href="?page=Tutoria
<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.
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