From a7f6c6640ac9295eec3ae2edbb2250179eb85e33 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 6 May 2006 02:26:20 +0000 Subject: Adding TActiveButton and TActiveTextBox --- framework/Web/UI/WebControls/TListControl.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TListControl.php') diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 1c615edc..1c7fe11b 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -113,15 +113,22 @@ abstract class TListControl extends TDataBoundControl if($this->getIsMultiSelect()) $writer->addAttribute('multiple','multiple'); if($this->getEnabled(true) && $this->getAutoPostBack() && $page->getClientSupportsJavaScript()) - { - $writer->addAttribute('id',$this->getClientID()); - $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.'.get_class($this),$this->getPostBackOptions()); - } + $this->renderClientControlScript($writer); if(!$this->getEnabled(true) && $this->getEnabled()) $writer->addAttribute('disabled','disabled'); parent::addAttributesToRender($writer); } + /** + * Renders the client-script code. + */ + protected function renderClientControlScript($writer) + { + $writer->addAttribute('id',$this->getClientID()); + $cs = $this->getPage()->getClientScript(); + $cs->registerPostBackControl(get_class($this),$this->getPostBackOptions()); + } + /** * @return array postback options for JS postback code */ -- cgit v1.2.3