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/TCheckBoxList.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'framework/Web/UI/WebControls/TCheckBoxList.php') 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