Change color of single table row?


I’d like to change the color of a specific row in a table (not the selected row!). Is that possible? If yes, how?

My purpose is to click on an edit button in a table row, then highlight the row that is currently edited. This row may also be a row that is not selected. So, how can I change the style of a specific row?

Use a
, and return a CSS stylename when the itemId == your desired itemId, and the propertyId is null.


e.g. (pseudo-code)[code]

table.setCellStyleGenerator(new Table.CellStyleGenerator() {
  public String getStyle(Table source, Object itemId, Object propertyId) {
    if (propertyId == null && itemId != null && itemId.equals(itemIdBeingEdited)) {
      return "being-edited";
    return null;


That works very well, thanks a lot!