summaryrefslogtreecommitdiff
path: root/framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-01-20 22:43:27 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-01-20 22:43:27 +0100
commit464a235c8c7dc070fb10ac47f2186f24a077ae0d (patch)
tree373c609aaa4ef489db51f6a0a089451fc80af472 /framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php
parent7369988330bf8796d9cf2564756baf4eb46871ba (diff)
One class per file: framework/Web/UI/JuiControls
Diffstat (limited to 'framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php')
-rw-r--r--framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php b/framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php
new file mode 100644
index 00000000..d722632e
--- /dev/null
+++ b/framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * TJuiAutoComplete class file.
+ *
+ * @author Wei Zhuo <weizhuo[at]gamil[dot]com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package System.Web.UI.ActiveControls
+ */
+
+/**
+ * TJuiAutoCompleteEventParameter contains the {@link getToken Token} requested by
+ * the user for a partial match of the suggestions.
+ *
+ * The {@link getSelectedIndex SelectedIndex} is a zero-based index of the
+ * suggestion selected by the user, -1 if not suggestion is selected.
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @package System.Web.UI.ActiveControls
+ * @since 3.1
+ */
+class TJuiAutoCompleteEventParameter extends TCallbackEventParameter
+{
+ private $_selectedIndex=-1;
+
+ /**
+ * Creates a new TCallbackEventParameter.
+ */
+ public function __construct($response, $parameter, $index=-1)
+ {
+ parent::__construct($response, $parameter);
+ $this->_selectedIndex=$index;
+ }
+
+ /**
+ * @return int selected suggestion zero-based index, -1 if not selected.
+ */
+ public function getSelectedIndex()
+ {
+ return $this->_selectedIndex;
+ }
+
+ /**
+ * @return string token for matching a list of suggestions.
+ */
+ public function getToken()
+ {
+ return $this->getCallbackParameter();
+ }
+} \ No newline at end of file