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.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

How to find element in UI

Fabio Perr
5 years ago Nov 02, 2017 10:37am
Marco Collovati
5 years ago Nov 05, 2017 9:12am

Hi Fabio,
are you using Navigator for changing views?
If so, you could implement beforeLeave method in your View implementation and share the same code you are using in the button listener.

Be aware that beforeLeave was introduced since Vaadin 8.1; if you are using an earlier version you can reach the same result registering a ViewChangeListener on Navigator.


Fabio Perr
5 years ago Nov 06, 2017 10:27am