我需要在 Openxava 的一个表中更改单行的背景颜色,例如整个行的字段status = resolved
应该变成绿色或date field = currentDate
应该变成黄色的行。
到目前为止,我更改了背景颜色custom.css
并进行了实验,naviox.css,
但它只更改了整个列表的背景颜色.ox-list
。提前致谢!
直接在定义的集合上使用 @RowStyle 注释:
@RowStyle(style = "row-highlight-rates", property = "notEqual", value = "true")
private List<Rate> rates;
在 custom.css 我添加 row-highlight-xxx :
tr.row-highlight-rates{
background-color: #e37d6f;
}
tr.row-highlight-rates:hover {
background-color: #d94b37;
}