diff options
Diffstat (limited to 'tests/FunctionalTests')
4 files changed, 102 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page new file mode 100644 index 00000000..acf56bfe --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page @@ -0,0 +1,27 @@ +<com:TForm>
+
+<com:TCallback ID="callback1" OnCallback="method1" />
+
+ <com:TCallbackOptions ID="options1">
+ <prop:ClientSide.OnSuccess>
+ var link1 = Prado.CallbackRequest.getRequestById('<%= $this->link1->ClientID %>');
+ Prado.Callback('<%= $this->callback1->UniqueID %>', link1.getCallbackParameter());
+ </prop:ClientSide.OnSuccess>
+
+ </com:TCallbackOptions>
+
+
+ <com:TActiveLinkButton
+ ID="link1"
+ Text="Tab 1"
+ OnCallback="method2"
+ ActiveControl.CallbackParameter="test"
+ ActiveControl.CallbackOptions="options1"/>
+
+<com:TActiveLabel ID="status1" />
+
+<com:TActiveLabel ID="status2" />
+
+<com:TJavascriptLogger />
+
+</com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php new file mode 100644 index 00000000..84099114 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php @@ -0,0 +1,17 @@ +<?php
+
+class ClientSideDispatch extends TPage
+{
+
+ function method1($sender, $param)
+ {
+ $this->status1->Text = "Method 1 callback with parameter: {$param->CallbackParameter}";
+ }
+
+ function method2($sender, $param)
+ {
+ $this->status2->Text = "Method 2 callback";
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page new file mode 100644 index 00000000..7de9c6ab --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page @@ -0,0 +1,30 @@ +<com:TForm>
+
+ <com:TRequiredFieldValidator
+ ControlToValidate="rad_button_list"
+ Text="You must click one"
+ Display="Dynamic"
+ ValidationGroup="Group"
+ />
+ <br />
+ <com:TActiveRadioButtonList
+ ID="rad_button_list"
+ OnCallback="radChange">
+ <com:TListItem Value="yes" Text="Yes" />
+ <com:TListItem Value="no" Text="No" />
+ <com:TListItem Value="whynot" Text="Why not?" />
+ </com:TActiveRadioButtonList>
+ <br />
+ <com:TActiveLabel
+ ID="label"
+ Text="Choice : " />
+ <br /><br /><br />
+ <com:TActiveButton
+ ID="action_button"
+ Text="action"
+ OnCallback="action"
+ ValidationGroup="Group" />
+
+
+<com:TJavascriptLogger />
+</com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php new file mode 100644 index 00000000..10c45aa3 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php @@ -0,0 +1,28 @@ +<?php
+
+class RadioButtonListTest extends TPage
+{
+ public function radChange($sender,$param){
+ $choice = 'Choice : ';
+ switch($this->rad_button_list->SelectedValue){
+ case 'yes':
+ $choice.='Yes :-)';
+ break;
+ case 'no':
+ $choice.='No :-(';
+ break;
+ case 'whynot':
+ $choice.='Why not ???';
+ break;
+ }
+ $this->label->Text = $choice;
+ }
+
+ public function action($sender,$param){
+ $this->label->Text = 'Action...';
+ }
+
+}
+
+
+?>
\ No newline at end of file |