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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Expand node programmatically in a TreeTable
Hi, when I edit a item in my TreeTable I call this method to refresh the table:
public void refresh() {
table.removeAllItems();
table.addItems(getPresenter().getItems());
table.sort();
}
After this code, TreeTable collapses, so I call:
table.setCollapsed(editedItemParent, false);
But this doesn't works, so my question is, How can I expand the edited item's parent?
Thank you.
It should work that way with setCollapsed(), so the problem probably is in some code that is not visible here. For example, I don't see you setting the item parents in the refresh() method.
It's a bit unusual to use item IDs for the item captions in TreeTable. I hope there isn't some confusion about the IDs when you edit the items, as their IDs change when you edit them.