Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
Sorting treetable column generated using columngenerator
Hi,
Please check the code below
TreeTable tt = new TreeTable();
tt.addContainerProperty("check", String.class, null);
for (int i = 1; i < 6; i++) {
String parent = "parent - " + i;
tt.addItem(parent);
for (int j = 1; j < 3; j++) {
String child = "child - " + i + j;
tt.addItem(child);
tt.setParent(child, parent);
}
}
tt.addGeneratedColumn("check", new ColumnGenerator() {
@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
Label label = new Label();
label.setValue(itemId.toString());
return label;
}
});
In the UI, clicking on the header doesnot sort the coIumn.
Please check attachment.
Thanks in advance
Last updated on
You cannot reply to this thread.