hello,
I want to have double click on table items my vaadin application. If Vaadin is providing this facility or there is any another way to do it.
Plz Help me as soon as possible.
Thanks in advance
Vikas
hello,
I want to have double click on table items my vaadin application. If Vaadin is providing this facility or there is any another way to do it.
Plz Help me as soon as possible.
Thanks in advance
Vikas
Hi!
It’s really very easy:
table.addListener(new ItemClickEvent.ItemClickListener() {
private static final long serialVersionUID = 2068314108919135281L;
public void itemClick(ItemClickEvent event) {
if (event.isDoubleClick()) {
// The item was double-clicked, event.getItem() returns the target.
}
}
});
HTH,
/Jonatan
Thank you Jonatan
Tank Friend,
table.addListener is deprecated in vaadin 7.
You just simple use table.addItemClickListener
ex:
table.addItemClickListener(new ItemClickListener() {
@Override
public void itemClick(ItemClickEvent event) {
if (!event.isDoubleClick())
return;
// do something in here
}
});
hi
i would like to disable the double click
Hmm,
I think you cannot disable what users do, but you can ignore double click events.
Kind regards
Matthias
if (event.getButton() == MouseButton.RIGHT){
Notification.show(“hello”);
}
Vaadin 8:
[code]
grid.addItemClickListener(new ItemClickListener() {
@Override
public void itemClick(Grid.ItemClick event) {
if (event.getMouseEventDetails().isDoubleClick()) {
…
[/code]
How to achieve the same for touch devices (like ipad) in Vaadin 7? Seems like its not recognizing event.isDoubleClick().