summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2007-04-17 15:10:17 +0000
committerxue <>2007-04-17 15:10:17 +0000
commitd704c8190b8064bfb73fdd3826f34fb00ea63102 (patch)
treea76bb4c46afc2b822a38e299449aca8aa21ca4a2 /framework/Web/UI/WebControls
parent4722fc6c8c2b3cd4adb54d8e666c9cd40a9cf7b3 (diff)
<div> tags are used instead of <span> when TDataList.RepeatLayout is Raw
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TDataList.php27
1 files changed, 22 insertions, 5 deletions
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php
index 6cd01008..5c8ec700 100644
--- a/framework/Web/UI/WebControls/TDataList.php
+++ b/framework/Web/UI/WebControls/TDataList.php
@@ -1096,11 +1096,9 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
public function renderItem($writer,$repeatInfo,$itemType,$index)
{
$item=$this->getItem($itemType,$index);
- $layout=$repeatInfo->getRepeatLayout();
- if($layout===TRepeatLayout::Raw)
- $item->renderContents($writer);
- else
- $item->renderControl($writer);
+ if($repeatInfo->getRepeatLayout()===TRepeatLayout::Raw && get_class($item)==='TDataListItem')
+ $item->setTagName('div');
+ $item->renderControl($writer);
}
/**
@@ -1611,6 +1609,25 @@ class TDataListItem extends TWebControl implements INamingContainer, IItemDataRe
*/
private $_data;
+ private $_tagName='span';
+
+ /**
+ * Returns the tag name used for this control.
+ * @return string tag name of the control to be rendered
+ */
+ protected function getTagName()
+ {
+ return $this->_tagName;
+ }
+
+ /**
+ * @param string tag name of the control to be rendered
+ */
+ public function setTagName($value)
+ {
+ $this->_tagName=$value;
+ }
+
/**
* Creates a style object for the control.
* This method creates a {@link TTableItemStyle} to be used by a datalist item.