From 4f968c045e0d09ab3e4f659743effb5305a963ce Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 30 Mar 2007 05:04:30 +0000 Subject: Fixed #507 and update other active controls. --- framework/Web/UI/ActiveControls/TActiveListBox.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'framework/Web/UI/ActiveControls/TActiveListBox.php') diff --git a/framework/Web/UI/ActiveControls/TActiveListBox.php b/framework/Web/UI/ActiveControls/TActiveListBox.php index 97b28ac7..cafb3a29 100644 --- a/framework/Web/UI/ActiveControls/TActiveListBox.php +++ b/framework/Web/UI/ActiveControls/TActiveListBox.php @@ -132,6 +132,26 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH if($multiple) $this->getPage()->registerPostDataLoader($multi_id); } + + /** + * Override parent implementation, no javascript is rendered here instead + * the javascript required for active control is registered in {@link addAttributesToRender}. + */ + protected function renderClientControlScript($writer) + { + } + + /** + * Ensure that the ID attribute is rendered and registers the javascript code + * for initializing the active control. + */ + protected function addAttributesToRender($writer) + { + parent::addAttributesToRender($writer); + $writer->addAttribute('id',$this->getClientID()); + $this->getActiveControl()->registerCallbackClientScript( + $this->getClientClassName(), $this->getPostBackOptions()); + } } ?> \ No newline at end of file -- cgit v1.2.3