5
我有一种情况,我有更多的数据可以容纳在单行中返回到dataTable元素。为了解决这个问题,我简单地将结果合并成一个单元格。我在寻找的是一种方法来确定我是否已经到达结果集中的最后一个对象,这样我可以放下用作分隔符的底部边框。最终我不知道我会处理多少个物体。样式在jsf数据表中的最后一条记录
.most {
background-color:cyan;
border-bottom:medium solid black;
}
.last {
border-bottom:none;
}
<h:dataTable id="myTable" value="#{flowData.selectedItem.profile}" var="profile" columnClasses="most, last">
<h:column>
<h:inputText id="_last" value="#{profile.last}" />
<h:inputText id="_first" value="#{profile.first}" />
<h:inputText id="_middle" value="#{profile.middle}" />
<h:inputText id="_city" value="#{profile.city}" />
<h:inputText id="_state" value="#{profile.state}" />
</h:column>
</h:dataTable>
在此先感谢您的任何意见。
感谢您的各种方式来解决这一个极好的说明。最后,我选择从bean中生成rowClass。它像一个魅力。 – Corpse 2012-02-08 23:01:26