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, 1 month ago
HierarchicalContainer.getProperty Type Conversion
Hey Short and simple quesiton
I'm putting an id of type Long into an Item(com.vaadin.data.Item) in a HierachicalContainer that is used in a tree.
item.getItemProperty(IVRContainer.ID).setValue(ivr.getId());
where ivr.getId() is a Long
When the node in the tree is clicked I fetch the property from the Item and the return type is String and not Long.
public void itemClick(ItemClickEvent event) {
Item item = event.getItem();
Object itemId = item.getItemProperty(IVRContainer.ID).getValue();
if(event.isDoubleClick()){
if (itemId instanceof Long){
...this block never excutes due to itemId being a String now
.....
This is annoying, is this a bug?
Cheers,
Matt
Last updated on Mar, 1st 2012
You cannot reply to this thread.