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/ --- .../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 +++ 14 files changed, 762 insertions(+) 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 (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples') 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: + + + + + + +
+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: + + + + + +
+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 -- cgit v1.2.3