summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-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.