summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php
diff options
context:
space:
mode:
authorwei <>2006-09-23 01:08:19 +0000
committerwei <>2006-09-23 01:08:19 +0000
commit9af56fd93ed071d86f14296cec618073f6c0941a (patch)
tree439b2ba2a89b79bbbd0ce95ad904bd5335c7a700 /tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php
parent0ccf3763474a18b72b6a166399fc1cf569b867f8 (diff)
Fixed #383
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php
new file mode 100644
index 00000000..022f6dad
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php
@@ -0,0 +1,34 @@
+<?php
+
+class PopulateActiveList extends TPage
+{
+ public function populate_list1($sender, $param)
+ {
+ $data = array('Hello', 'World', 'Prado');
+ $this->list1->Items->clear();
+ for($i = 0,$k=count($data); $i<$k; $i++)
+ {
+ $item = new TListItem($data[$i], $i);
+ $this->list1->Items[] = $item;
+ }
+ }
+
+ public function populate_list2($sender, $param)
+ {
+ $data = array('Hello', 'World', 'Prado');
+ $this->list2->Items->clear();
+ for($i = 0,$k=count($data); $i<$k; $i++)
+ {
+ $item = new TListItem($data[$i], $i);
+ $this->list2->Items[] = $item;
+ }
+ }
+
+ public function list_changed($sender, $param)
+ {
+ $text = $sender->SelectedItem ? $sender->SelectedItem->Text : 'Not selected';
+ $this->label1->Text = $sender->ID . ': '.$text;
+ }
+}
+
+?> \ No newline at end of file