From f0a6fad58f8eae14554443081ffb166aaf71762a Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 29 Aug 2006 12:06:35 +0000 Subject: fixed autocomplete problem and add TInPlcaeTextbox --- framework/Web/UI/ActiveControls/TActiveTextBox.php | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'framework/Web/UI/ActiveControls/TActiveTextBox.php') diff --git a/framework/Web/UI/ActiveControls/TActiveTextBox.php b/framework/Web/UI/ActiveControls/TActiveTextBox.php index 20358a36..c5f0f152 100644 --- a/framework/Web/UI/ActiveControls/TActiveTextBox.php +++ b/framework/Web/UI/ActiveControls/TActiveTextBox.php @@ -84,6 +84,31 @@ class TActiveTextBox extends TTextBox implements ICallbackEventHandler, IActiveC $this->raiseEvent('OnCallback', $this, $param); } + /** + * Loads user input data. + * This method is primarly used by framework developers. + * @param string the key that can be used to retrieve data from the input data collection + * @param array the input data collection + * @return boolean whether the data of the component has been changed + */ + public function loadPostData($key,$values) + { + $value=$values[$key]; + if($this->getAutoTrim()) + $value=trim($value); + if(!$this->getReadOnly() && $this->getText()!==$value) + { + $enabled = $this->getActiveControl()->getEnableUpdate(); + $this->getActiveControl()->setEnableUpdate(false); + $this->setText($value); + $this->getActiveControl()->setEnableUpdate($enabled); + return true; + } + else + return false; + } + + /** * Renders the javascript for textbox. */ -- cgit v1.2.3