In Vaadin 7, when you have a table with a container data source, you can do this:
table.setValue(container.getItemIds());
Vaadin 6 works for me:
public void selectAll() { int size = table.getItemIds().size(); for(int i = 0; i < size; i++) { table.select(i); } table.requestRepaint(); }
And of course, in both versions of Vaadin, do not forget these lines:
table.setSelectable(true); table.setMultiSelect(true);
source share