From 3c03a42d1edb0ec26110ace00f42e156cabff67b Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 9 Dec 2006 09:17:22 +0000 Subject: Fixed #433, #384, #439, #477, #435, #422, #401, #359. Add more class docs for sqlmap. --- .../tickets/protected/pages/Ticket384.php | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket384.php (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket384.php') 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 @@ +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 -- cgit v1.2.3