From 95764689f7681d5905c199727dd456671f2fd1b6 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 17 Mar 2006 22:58:05 +0000 Subject: Cleanup of usage of registerPostBackControl. --- framework/Web/UI/WebControls/TTextBox.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TTextBox.php') diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index 7d1b9cba..bc490cdc 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -144,17 +144,18 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable if($this->getEnabled(true) && $this->getAutoPostBack() && $page->getClientSupportsJavaScript()) { $writer->addAttribute('id',$this->getClientID()); - $this->getPage()->getClientScript()->registerPostBackControl($this); + $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TTextBox',$this->getPostBackOptions()); } parent::addAttributesToRender($writer); } /** - * Sets the post back options for this textbox. - * @return TPostBackOptions + * Gets the post back options for this textbox. + * @return array */ - public function getPostBackOptions() + protected function getPostBackOptions() { + $options['ID'] = $this->getClientID(); $options['EventTarget'] = $this->getUniqueID(); $options['CausesValidation'] = $this->getCausesValidation(); $options['ValidationGroup'] = $this->getValidationGroup(); -- cgit v1.2.3