From 464a235c8c7dc070fb10ac47f2186f24a077ae0d Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 20 Jan 2015 22:43:27 +0100 Subject: One class per file: framework/Web/UI/JuiControls --- .../JuiControls/TJuiAutoCompleteEventParameter.php | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php (limited to 'framework/Web/UI/JuiControls/TJuiAutoCompleteEventParameter.php') 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 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 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 + * @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 -- cgit v1.2.3