diff options
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveCheckBoxList.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActiveCheckBoxList.php | 21 |
1 files changed, 15 insertions, 6 deletions
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; } /** |