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.
Tree item and DoubleClick
hello,
Is there a way to detect a double click event in an tree item?
thanks in advance
Yes it is. See the itemclicklistener sample from Sampler.
Hi Jouni,
I used the ItemClickListener to add single click listener for tree, that works perfectly:
ItemClickListener treeclick = new ItemClickListener(){
@Override
public void itemClick(final ItemClickEvent event) {
getWindow().showNotification(
"Notification",
event.getItemId().toString(),
Notification.TYPE_WARNING_MESSAGE);
}
}
But when I would allow double click event to the tree, I use the isDoubleClick() method:
ItemClickListener treeclick = new ItemClickListener(){
@Override
public void itemClick(final ItemClickEvent event) {
if(event.isDoubleClick()){
getWindow().showNotification(
"Notification",
event.getItemId().toString(),
Notification.TYPE_WARNING_MESSAGE);
}
}
}
No result for this instruction :(
I note that the isDoubleClick() is from com.vaadin.event.MouseEvents.ClickEvent, and the tree event is from com.vaadin.event.ItemClickEvent, is there the problem?
It is possible to use the clickEvent for tree instead of the ItemClickEvent ?
As far as I can tell, the click behavior in this case is buggy. I suggest you create a bug report in the bug tracker.