summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket384.php
diff options
context:
space:
mode:
authorwei <>2006-12-09 09:17:22 +0000
committerwei <>2006-12-09 09:17:22 +0000
commit3c03a42d1edb0ec26110ace00f42e156cabff67b (patch)
tree66baa1cd4afca87668be07e62406e7d538dd1fbb /tests/FunctionalTests/tickets/protected/pages/Ticket384.php
parent33b2284955a8f0015922d4c69c5082141b584f27 (diff)
Fixed #433, #384, #439, #477, #435, #422, #401, #359. Add more class docs for sqlmap.
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket384.php')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket384.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket384.php b/tests/FunctionalTests/tickets/protected/pages/Ticket384.php
new file mode 100644
index 00000000..e928632d
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket384.php
@@ -0,0 +1,46 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Ticket384 extends TPage
+{
+ public function initRecursive($namingContainer=null)
+ {
+ parent::initRecursive($namingContainer);
+ $this->AutoCompleteRepeater->setDataSource(array(1, 2));
+ $this->AutoCompleteRepeater->dataBind();
+ }
+
+ public function submitCallback($sender, $param)
+ {
+ $this->AutoCompleteRepeater->setDataSource(array(1,2,3,4));
+ $this->AutoCompleteRepeater->dataBind();
+ $this->AutoCompletePanel->render($this->getResponse()->createHtmlWriter());
+ }
+
+ public function suggestCountries($sender, $param)
+ {
+ $sender->setDataSource($this->matchCountries($param->getCallbackParameter()));
+ $sender->dataBind();
+ }
+
+ protected function matchCountries($token)
+ {
+ $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en');
+ $list = array();
+ $count = 0;
+ $token = strtolower($token);
+ foreach($info->getCountries() as $country)
+ {
+ if(strpos(strtolower($country), $token) === 0)
+ {
+ $list[] = $country;
+ $count++;
+ if($count > 10) break;
+ }
+ }
+ return $list;
+ }
+}
+
+?> \ No newline at end of file