diff options
author | xue <> | 2006-01-14 00:19:18 +0000 |
---|---|---|
committer | xue <> | 2006-01-14 00:19:18 +0000 |
commit | f16aa6762984e4d555a1cf93692db0a69fa2ab38 (patch) | |
tree | 5a460a73acb869cc58ecb1277118b2e039e0fd1b /framework/Web/UI/WebControls/TRepeater.php | |
parent | f0737c5b52373f262a4c8cfd25d4e1bb6ff33aee (diff) |
Added TBaseDataList control. Updated class tree. Modified TTextBox about SafeHtml support. Modified TTextBox demo accordingly.
Diffstat (limited to 'framework/Web/UI/WebControls/TRepeater.php')
-rw-r--r-- | framework/Web/UI/WebControls/TRepeater.php | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index c9ecd255..d0d513b0 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -370,22 +370,19 @@ class TRepeater extends TDataBoundControl implements INamingContainer $items=$this->getItems();
$items->clear();
$itemIndex=0;
- if($data!==null)
+ $hasSeparator=$this->_separatorTemplate!=='';
+ foreach($data as $dataItem)
{
- $hasSeparator=$this->_separatorTemplate!=='';
- foreach($data as $dataItem)
- {
- if($itemIndex===0 && $this->_headerTemplate!=='')
- $this->_header=$this->createItemInternal(-1,'Header',true,null);
- if($hasSeparator && $itemIndex>0)
- $this->createItemInternal($itemIndex-1,'Separator',true,null);
- $itemType=$itemIndex%2==0?'Item':'AlternatingItem';
- $items->add($this->createItemInternal($itemIndex,$itemType,true,$dataItem));
- $itemIndex++;
- }
- if($itemIndex>0 && $this->_footerTemplate!=='')
- $this->_footer=$this->createItemInternal(-1,'Footer',true,null);
+ if($itemIndex===0 && $this->_headerTemplate!=='')
+ $this->_header=$this->createItemInternal(-1,'Header',true,null);
+ if($hasSeparator && $itemIndex>0)
+ $this->createItemInternal($itemIndex-1,'Separator',true,null);
+ $itemType=$itemIndex%2==0?'Item':'AlternatingItem';
+ $items->add($this->createItemInternal($itemIndex,$itemType,true,$dataItem));
+ $itemIndex++;
}
+ if($itemIndex>0 && $this->_footerTemplate!=='')
+ $this->_footer=$this->createItemInternal(-1,'Footer',true,null);
$this->setViewState('ItemCount',$itemIndex,0);
}
|