Lorenzo Sciuto Lorenzo Sciuto - 1 year ago 283
Java Question

Vaadin - Highlight table selected cell/row

Is it possible to highlight the selected cell or the selected row in a Vaadin Table component?
I should perform this via java..so then when I catch a clicked item with an ItemClickListener I should push a customized background only to the selected cell (or row).
Any tips?

Answer Source

Built-in themes for Vaadin usually support specific style for selected row in vaadin table.

If you want to apply custom style on selected row you can do it through CSS:

.v-table tr.v-selected {
    background-color: #5B677D;
    color: #fff;

Prerequisite: Chapter 8.4 "Creating and Using Themes" from Book of Vaadin

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download