From f30c38fcc9d6cdfa7aafa5078a58645192c11974 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 11 Jun 2006 22:01:52 +0000 Subject: Prado js files are not rendered at the beginning of the form --- framework/Web/UI/WebControls/TListControl.php | 14 ++++++++++---- 1 file changed, 10 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 2c42c462..ccb400dc 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -116,16 +116,22 @@ abstract class TListControl extends TDataBoundControl if($this->getEnabled(true)) { if($this->getAutoPostBack() && $page->getClientSupportsJavaScript()) - { - $writer->addAttribute('id',$this->getClientID()); - $this->getPage()->getClientScript()->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions()); - } + $this->renderClientControlScript($writer); } else if($this->getEnabled()) $writer->addAttribute('disabled','disabled'); parent::addAttributesToRender($writer); } + /** + * Renders the javascript for list control. + */ + protected function renderClientControlScript($writer) + { + $writer->addAttribute('id',$this->getClientID()); + $this->getPage()->getClientScript()->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions()); + } + /** * Gets the name of the javascript class responsible for performing postback for this control. * This method overrides the parent implementation. -- cgit v1.2.3