I haven't checked but most probably the opening of the cell has already been generated by the time getValue
is called, so setCellStyleNames
will only apply to the remaining cells in the column.
The right way to do it is to override getCellStyleNames
of the column to return the CSS class name or not depending on the cell value.
BTW, you can then extend IdentityColumn
as the getValue
then becomes trivial.