Problem with tree.select

I have a tree in my code, but when write tree.select(item1),the item1 does not light.
It is a problem of method select() ?

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