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.
Confirm Dialog displayed twice
I'm having a weird problem right now with this addon. I'm using Vaadin 7.6.1 and Addon version 2.1.3 (latest at the time of writing), and whenever I show a confirmation. I get the confirmation window 2 times, so I need to click on "cancel" twice.
Is anyone experiencing the same issue?
Any ideas on how to solve it?
ConfirmDialog.show(getUI(), "Por favor, confirme", "¿Está seguro de que desea eliminar el elemento?", "Confirmar", "Cancelar", (ConfirmDialog.Listener) dialog -> {
if (dialog.isConfirmed()) {
accountingService.delete(selectedRow);
dtITems.getContainerDataSource().removeItem(selectedRow);
Notification.show("Elemento eliminado correctamente", Notification.Type.TRAY_NOTIFICATION);
dtButtonBar.setVisible(false); loadElements();
}
});
Thanks in advance,
Fran
Solved.
Repeat 100 times: Don't register listeners in the "enter" method of the view....Don't register listeners in the "enter" method of the view...Don't register listeners in the "enter" method of the view...Don't register listeners in the "enter" method of the view...
All listeners were registered twice. Better registering them in the constructor or inside a @Postcontruct method.