From 36f2ce766bde98c11d57b889fd9e1a7f8dff6010 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 1 Oct 2006 03:09:18 +0000 Subject: Fixed #350 and #148, Add TActiveRatingList, should remove TRatingList from WebControls. --- .../Web/UI/ActiveControls/TActiveCheckBoxList.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'framework/Web/UI/ActiveControls/TActiveCheckBoxList.php') diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php b/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php index f70a6407..b18d0d0d 100644 --- a/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php +++ b/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php @@ -43,9 +43,9 @@ class TActiveCheckBoxList extends TCheckBoxList implements IActiveControl, ICall */ public function __construct() { - parent::__construct(); $this->setAdapter(new TActiveListControlAdapter($this)); $this->setAutoPostBack(true); + parent::__construct(); } /** @@ -57,13 +57,20 @@ class TActiveCheckBoxList extends TCheckBoxList implements IActiveControl, ICall } /** - * No client class for this control. - * This method overrides the parent implementation. - * @return null no javascript class name. + * @return string javascript client-side control class name. */ protected function getClientClassName() { - return null; + return 'Prado.WebUI.TActiveCheckBoxList'; + } + + /** + * Registers the javascript code for initializing the active control. + */ + protected function renderClientControlScript($writer) + { + $this->getActiveControl()->registerCallbackClientScript( + $this->getClientClassName(), $this->getPostBackOptions()); } /** @@ -72,7 +79,9 @@ class TActiveCheckBoxList extends TCheckBoxList implements IActiveControl, ICall */ protected function createRepeatedControl() { - return new TActiveCheckBox; + $control = new TActiveCheckBox; + $control->getAdapter()->setBaseActiveControl($this->getActiveControl()); + return $control; } /** -- cgit v1.2.3