summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TRepeater.php
diff options
context:
space:
mode:
authorxue <>2007-02-04 17:03:45 +0000
committerxue <>2007-02-04 17:03:45 +0000
commitf86b7d848ced181ea3c94ec1e760f0be3f58a3b1 (patch)
tree9660c603b13cf386f8384f50ed4c975157f238cc /framework/Web/UI/WebControls/TRepeater.php
parentcb7abfbc8a9f93c61345c53b63e259162bb3de2a (diff)
added renderer feature to TDataList.
Diffstat (limited to 'framework/Web/UI/WebControls/TRepeater.php')
-rw-r--r--framework/Web/UI/WebControls/TRepeater.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php
index f6093667..2df8343e 100644
--- a/framework/Web/UI/WebControls/TRepeater.php
+++ b/framework/Web/UI/WebControls/TRepeater.php
@@ -453,7 +453,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
* Creates a repeater item.
* This method invokes {@link createItem} to create a new repeater item.
* @param integer zero-based item index.
- * @param string item type, may be 'Header', 'Footer', 'Empty', 'Item', 'Separator', 'AlternatingItem'.
+ * @param TListItemType item type
* @return TControl the created item, null if item is not created
*/
private function createItemInternal($itemIndex,$itemType)
@@ -473,7 +473,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
* Creates a repeater item and performs databinding.
* This method invokes {@link createItem} to create a new repeater item.
* @param integer zero-based item index.
- * @param string item type, may be 'Header', 'Footer', 'Empty', 'Item', 'Separator', 'AlternatingItem'.
+ * @param TListItemType item type
* @param mixed data to be associated with the item
* @return TControl the created item, null if item is not created
*/
@@ -497,7 +497,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
/**
* Creates a repeater item instance based on the item type and index.
* @param integer zero-based item index
- * @param string item type, may be 'Header', 'Footer', 'Empty', 'Item', 'Separator', 'AlternatingItem'.
+ * @param TListItemType item type
* @return TControl created repeater item
*/
protected function createItem($itemIndex,$itemType)
@@ -571,7 +571,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
public function render($writer)
{
- if($this->_items && $this->_items->getCount() || $this->_emptyTemplate!==null)
+ if($this->_items && $this->_items->getCount() || $this->_emptyTemplate!==null || $this->getEmptyRenderer()!=='')
$this->renderContents($writer);
}
@@ -670,7 +670,10 @@ class TRepeater extends TDataBoundControl implements INamingContainer
if($itemIndex>0)
$this->_footer=$this->createItemWithDataInternal(-1,TListItemType::Footer,null);
else
+ {
$this->createEmptyContent();
+ $this->dataBindChildren();
+ }
$this->setViewState('ItemCount',$itemIndex,0);
}
@@ -981,7 +984,6 @@ class TRepeaterItem extends TControl implements INamingContainer, IItemDataRende
*
* TRepeaterItemRenderer can be used as a convenient base class to
* define an item renderer class for {@link TRepeater}.
- * that implements
*
* Because TRepeaterItemRenderer extends from {@link TTemplateControl}, derived child classes
* can have templates to define their presentational layout.