Change color of single table row?

HI,

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
Table.CellStyleGenerator
, and return a CSS stylename when the itemId == your desired itemId, and the propertyId is null.
Cheers,

Charles.

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

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

[/code]

That works very well, thanks a lot!