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.
How to get itemId of an item of TreeTable in another class?
Hi,
Items are added into a TreeTable like this:
trtbMain.addItem(new Object[] {v1, v2}, someId);
Note: someId is a guid like d5d78d9e-3b66-4f15-81f6-c70d8ec909a7
Added items are displayed correctly. I'm trying to pass the selected item to another class. The target class has getter and setter as below:
public class TargetClass {
private com.vaadin.data.Item sourceItem;
public TargetClass() {}
protected com.vaadin.data.Item getSourceItem() { return sourceItem; }
protected void setSourceItem(com.vaadin.data.Item value) { sourceItem=value; }
}
I pass the selected item to the target class like this:
...
targetClass.setSourceItem(trtbMain.getItem(trtbMain.getValue()));
...
The selected item is passed to the target class succesfully but I couldn't find a way to get the item's id which is a guid. I can see the id in Eclipse in debug mode when i move the mouse pointer on sourceItem. How can I access the item's id?
Thank you...