【发布时间】:2014-12-09 21:02:27
【问题描述】:
嗨,这是我的第一篇文章,很抱歉我的英语不好。我正在使用 PrimeFaces 5,我想将数据显示到 dataTable 中,但我的问题是:数据是垂直显示的,我想水平显示它。
在我的 Bean 中,我有一个 SerieVO 对象的 ArrayList。每个 SerieVO 对象都有一个名称。
String name1 = "Serie 1";
String name2 = "Serie 2";
String name3 = "Serie 3";
listSerieVO.add( new SerieVO( name1 ) );
listSerieVO.add( new SerieVO( name2 ) );
listSerieVO.add( new SerieVO( name3 ) );
在我的 xhtml 中,我有一个数据表:
<h:dataTable value="#{myBB.listSerieVO}" var="data">
<h:column>
#{data.name}
</h:column>
</h:dataTable>
结果是:
意甲
意甲 2
意甲 3
但我想要以下内容:
意甲 1 |意甲 2 |意甲 3
任何建议将不胜感激。谢谢!
【问题讨论】:
标签: primefaces datatable