summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected
diff options
context:
space:
mode:
authorwei <>2007-03-30 05:04:30 +0000
committerwei <>2007-03-30 05:04:30 +0000
commit4f968c045e0d09ab3e4f659743effb5305a963ce (patch)
tree58d5cb87db43ba87c0a559d411e9d36aa0bd7f3c /tests/FunctionalTests/tickets/protected
parent70744a98444df0583d76f19d4e399a5cc49349b7 (diff)
Fixed #507 and update other active controls.
Diffstat (limited to 'tests/FunctionalTests/tickets/protected')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket507.page29
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket507.php25
2 files changed, 54 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket507.page b/tests/FunctionalTests/tickets/protected/pages/Ticket507.page
new file mode 100644
index 00000000..f80dea44
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket507.page
@@ -0,0 +1,29 @@
+<com:TContent ID="Content">
+
+ <com:TActiveListBox ID="list1"
+ Enabled="false"
+ OnCallback="list1_callback">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+ <com:TListItem Value="value 5" Text="item 5" />
+ </com:TActiveListBox>
+
+ <com:TActiveLabel ID="label1" Text="Label 1" />
+
+ <com:TActiveButton Text="Enable it" id="button1" onClick="enable_list" />
+
+<div>
+<pre>
+ SelectionMode="Multiple"
+ --&gt; this doesn't work Enabled="false"
+ --&gt; enable selection in code but
+ --&gt; getSelectedValues returns Null
+ --&gt; enabled and disbaled dynamically doesn't solved the
+ --&gt; problem either.
+</pre>
+</div>
+
+</com:TContent>
+
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket507.php b/tests/FunctionalTests/tickets/protected/pages/Ticket507.php
new file mode 100644
index 00000000..94cd8aed
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket507.php
@@ -0,0 +1,25 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+class Ticket507 extends TPage
+{
+
+ public function onLoad($s)
+ {
+ //the following fixed the static declaration on the above
+ $this->list1->SelectionMode="Multiple";
+ }
+
+ function list1_callback($sender, $param)
+ {
+ $values = $sender->getSelectedValues();
+ $this->label1->setText("Selection: ".implode(', ', $values));
+ }
+
+ function enable_list()
+ {
+ $this->list1->enabled = true;
+ }
+}
+
+?> \ No newline at end of file