diff options
author | ctrlaltca@gmail.com <> | 2011-06-02 16:06:37 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2011-06-02 16:06:37 +0000 |
commit | 6394a6ffe3a9f3e4e698603b94503dc96f1e2652 (patch) | |
tree | 26dfde346742329d064d336936edf20fdb7cb81e /demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList | |
parent | b9f9a16d7eefc48ac489c8cb2b87749459bb3d38 (diff) |
upported documentation changes to trunk/
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButtonList')
2 files changed, 92 insertions, 0 deletions
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 |