【发布时间】:2015-04-24 13:12:40
【问题描述】:
基于下拉值,我想以多色显示数据表行。我遵循this 示例,但它显示所有行绿色或红色
我的代码:-
<p:dataTable id="empAtendanceTable"
var="report"
value="#{empBean.empReport}"
rowStyleClass="#{report.status==false ? 'colored' : null} #{report.status==true ? 'error' : null}">
CSS:
.colored {
background: red;
color: white;
}
.error {
background: green;
color: white;
}
如何改变颜色?我使用的是 PrimeFaces 5.1 版本。
【问题讨论】:
标签: css jsf primefaces