diff options
author | wei <> | 2007-05-08 03:02:03 +0000 |
---|---|---|
committer | wei <> | 2007-05-08 03:02:03 +0000 |
commit | 0ee23d595c73a94fd61e486cce2f6f42b4c19fdf (patch) | |
tree | 7479a355344263f3343fff6d0804eed6fbf8f5e6 /tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php | |
parent | 33737a9270c27478da9f4d50d0fd2bb26ceb6991 (diff) |
Fixed #587
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php')
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php b/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php new file mode 100644 index 00000000..7d24e5f6 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php @@ -0,0 +1,62 @@ +<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Ticket587_reopened extends TPage
+{
+ function list1_changed($sender)
+ {
+ $this->label1->setText("Selection 1: ".$sender->getSelectedValue());
+ $this->addOptionsToList2($sender->getSelectedValue(),$sender->getSelectedIndex());
+ }
+
+ function suggest($sender, $param)
+ {
+ $this->list2->Items->clear();
+ for($i = 0; $i < 2; $i++)
+ $this->list2->Items[$i] = 'asd 3 - item '.($i+1);
+ }
+
+ function addOptionsToList2($parent,$index)
+ {
+ $this->list2->Items->clear();
+ for($i = 0; $i < 2+$index; $i++)
+ $this->list2->Items[$i] = $parent.' - item '.($i+1);
+ $this->list2->setEnabled(true);
+ }
+
+ function list2_changed($sender)
+ {
+ $this->label1->setText("Selection 2: ".$sender->getSelectedValue());
+ }
+
+ function select_index_3()
+ {
+ $this->list1->setSelectedIndex(3);
+ }
+
+ function clear_selections()
+ {
+ $this->list1->clearSelection();
+ }
+
+ function select_value_2()
+ {
+ $this->list1->setSelectedValue("value 2");
+ }
+
+ function select_index_3_plus()
+ {
+ $this->list1->setSelectedValue("value 3");
+ $this->list1_changed($this->list1);
+ $this->list2->setSelectedValue("value 3 - item 3");
+ }
+
+ function do_postback()
+ {
+ $value = 'List 1: '.$this->list1->selectedValue. ', List 2: '. $this->list2->selectedValue;
+ $this->label1->Text = $value;
+ }
+}
+
+?>
\ No newline at end of file |