From 9e2820e98640f4ca262db7279a514826341df3e0 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 8 Oct 2006 05:11:23 +0000 Subject: Fixed #414, #411, #415 --- .../Web/UI/ActiveControls/TInPlaceTextBox.php | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'framework/Web/UI/ActiveControls/TInPlaceTextBox.php') diff --git a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php index 236e43d5..16ffafb7 100644 --- a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php +++ b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php @@ -66,6 +66,37 @@ class TInPlaceTextBox extends TActiveTextBox return $this->getViewState('AutoHide', true); } + /** + * @param boolean true to display the edit textbox + */ + public function setDisplayTextBox($value) + { + $value = TPropertyValue::ensureBoolean($value); + $this->setViewState('DisplayTextBox', $value,false); + if($this->getActiveControl()->canUpdateClientSide()) + $this->callClientFunction('setDisplayTextBox',$value); + } + + /** + * @return boolean true to display the edit textbox + */ + public function getDisplayTextBox() + { + return $this->getViewState('DisplayTextBox', false); + } + + /** + * Calls the client-side static method for this control class. + * @param string static method name + * @param mixed method parmaeter + */ + protected function callClientFunction($func,$value) + { + $client = $this->getPage()->getCallbackClient(); + $code = $this->getClientClassName().'.'.$func; + $client->callClientFunction($code,array($this,$value)); + } + /** * @param string ID of the control that can trigger to edit the textbox */ -- cgit v1.2.3