0

我需要在 Openxava 的一个表中更改单行的背景颜色,例如整个行的字段status = resolved应该变成绿色或date field = currentDate应该变成黄色的行。

到目前为止,我更改了背景颜色custom.css并进行了实验,naviox.css,但它只更改了整个列表的背景颜色.ox-list。提前致谢!

4

1 回答 1

0

直接在定义的集合上使用 @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;
}
于 2016-09-15T08:15:56.423 回答