summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages')
-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