Frage

My question is very simple but I really didn't find any solution here. I have a Table setSelectable(true), setMultiselect(false), setImmediate(true).

It works fine by first click and moving through the table using arrows. But if I click again to the row already having been selected, then it becomes unselected. How to prevent it? I'd like to have kept just one row always selected.

War es hilfreich?

Lösung

As from the Vaadin Book here:

If the user clicks on an already selected item, the selection will deselected and the table property will have null value. You can disable this behaviour by setting setNullSelectionAllowed(false) for the table.

So:

table.setNullSelectionAllowed(false);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top