summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php68
1 files changed, 34 insertions, 34 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php
index ca8a9e59..290995c7 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php
@@ -1,34 +1,34 @@
-<?php
-// $Id$
-class Home extends TPage
-{
- public function suggestNames($sender,$param) {
- // Get the token
- $token=$param->getToken();
- // Sender is the Suggestions repeater
- $sender->DataSource=$this->getDummyData($token);
- $sender->dataBind();
- }
-
- public function suggestionSelected1($sender,$param) {
- $id=$sender->Suggestions->DataKeys[ $param->selectedIndex ];
- $this->Selection1->Text='Selected ID: '.$id;
- }
-
- public function suggestionSelected2($sender,$param) {
- $id=$sender->Suggestions->DataKeys[ $param->selectedIndex ];
- $this->Selection2->Text='Selected ID: '.$id;
- }
-
- public function getDummyData($token) {
- // You would look for matches to the given token here
- return array(
- array('id'=>1, 'name'=>'John'),
- array('id'=>2, 'name'=>'Paul'),
- array('id'=>3, 'name'=>'George'),
- array('id'=>4, 'name'=>'Ringo')
- );
- }
-}
-
-?>
+<?php
+// $Id$
+class Home extends TPage
+{
+ public function suggestNames($sender,$param) {
+ // Get the token
+ $token=$param->getToken();
+ // Sender is the Suggestions repeater
+ $sender->DataSource=$this->getDummyData($token);
+ $sender->dataBind();
+ }
+
+ public function suggestionSelected1($sender,$param) {
+ $id=$sender->Suggestions->DataKeys[ $param->selectedIndex ];
+ $this->Selection1->Text='Selected ID: '.$id;
+ }
+
+ public function suggestionSelected2($sender,$param) {
+ $id=$sender->Suggestions->DataKeys[ $param->selectedIndex ];
+ $this->Selection2->Text='Selected ID: '.$id;
+ }
+
+ public function getDummyData($token) {
+ // You would look for matches to the given token here
+ return array(
+ array('id'=>1, 'name'=>'John'),
+ array('id'=>2, 'name'=>'Paul'),
+ array('id'=>3, 'name'=>'George'),
+ array('id'=>4, 'name'=>'Ringo')
+ );
+ }
+}
+
+?>