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. --- .../UI/ActiveControls/TActiveRadioButtonList.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'framework/Web/UI/ActiveControls/TActiveRadioButtonList.php') diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php index 3eb57ec7..f971228f 100644 --- a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php +++ b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php @@ -38,9 +38,9 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, */ public function __construct() { - parent::__construct(); $this->setAdapter(new TActiveListControlAdapter($this)); $this->setAutoPostBack(true); + parent::__construct(); } /** @@ -52,13 +52,20 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, } /** - * 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.TActiveRadioButtonList'; + } + + /** + * Registers the javascript code for initializing the active control. + */ + protected function renderClientControlScript($writer) + { + $this->getActiveControl()->registerCallbackClientScript( + $this->getClientClassName(), $this->getPostBackOptions()); } /** @@ -67,7 +74,9 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, */ protected function createRepeatedControl() { - return new TActiveRadioButton; + $control = new TActiveRadioButton; + $control->getAdapter()->setBaseActiveControl($this->getActiveControl()); + return $control; } /** -- cgit v1.2.3