Hello dear Vaadin Users,
I am facing a hopefully small problem. I created a table which has a generated column containing a checkbox. This CheckBox should be toggeled by a click on the CheckBox’s column header. In order to do that I overrode the sort method and added the following code:
[font=Courier New]
public void sort() {
Object superSortId = super.getSortContainerPropertyId(); if ("select".equals(superSortId) ) { [indent]
toggleSelectAll();
return ;
} else {
[indent]
super.sort();
[/indent]
}
[/indent]}
protected void toggleSelectAll() {
[indent]
selectAll = !selectAll;
for (CheckBox checkbox : checkboxes) {
[indent]
checkbox.setValue(Boolean.valueOf(selectAll));
checkbox.requestRepaint();
[/indent]
}
[/indent]
}
[/font]
The problem is that no matter what I do, I can’t set the checkboxes to checked. How can I do this?
Thanks in advance for any assistance!