Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Problem with tree.select

Peppe Lapolla
5 years ago Dec 02, 2016 12:30pm
Ricardo Mannrich
5 years ago Dec 03, 2016 4:22pm

Without your code it's difficult to understand what happens. If this Tree is in single select mode, you may use setValue instead.

When using select, you must pass the itemId and not the Item (Vaadin Item class) itself. BTW, sometimes the bean is used as ItemId. In this case, if the ItemId is a new instance (with the same attributes), you must implement equals() in the Id class (usually the bean).