From 7670361a4fb7d660352ba998da821c51da18c448 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 11 Feb 2006 05:18:50 +0000 Subject: Fixed Ticket #46. --- framework/Web/UI/WebControls/TCheckBox.php | 1 - framework/Web/UI/WebControls/TCheckBoxList.php | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index 60b45e8d..f1299849 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -224,7 +224,6 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl */ public function render($writer) { - $this->addAttributesToRender($writer); $this->getPage()->ensureRenderInForm($this); $needSpan=false; if($this->getHasStyle()) diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index 18aef302..a7e6a11c 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -272,17 +272,18 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont */ public function renderItem($writer,$repeatInfo,$itemType,$index) { + $repeatedControl=$this->_repeatedControl; $item=$this->getItems()->itemAt($index); if($item->getHasAttributes()) - $this->_repeatedControl->getAttributes()->copyFrom($item->getAttributes()); - else if($this->_repeatedControl->getHasAttributes()) - $this->_repeatedControl->getAttributes()->clear(); - $this->_repeatedControl->setID("$index"); - $this->_repeatedControl->setText($item->getText()); - $this->_repeatedControl->setChecked($item->getSelected()); - $this->_repeatedControl->setAttribute('value',$item->getValue()); - $this->_repeatedControl->setEnabled($this->_isEnabled && $item->getEnabled()); - $this->_repeatedControl->renderControl($writer); + $repeatedControl->getAttributes()->copyFrom($item->getAttributes()); + else if($repeatedControl->getHasAttributes()) + $repeatedControl->getAttributes()->clear(); + $repeatedControl->setID("$index"); + $repeatedControl->setText($item->getText()); + $repeatedControl->setChecked($item->getSelected()); + $repeatedControl->setAttribute('value',$item->getValue()); + $repeatedControl->setEnabled($this->_isEnabled && $item->getEnabled()); + $repeatedControl->renderControl($writer); } /** -- cgit v1.2.3