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.

Conformation box on Browser Close

Arun Antony
10 years ago Nov 16, 2012 6:56am

Need to get a confirmation box when a browser gets closed ..Anyone please help me on this ..

I tried the below one but the Browser closes before any action is done

final Window win = new Window(windowName) {
protected void close() {
getWindow().showNotification("Window closed by user",Notification.TYPE_WARNING_MESSAGE);
Can some one help on how i can resolve it .. or can suggest me an alternate solution for this .

daniel christopher
10 years ago Nov 28, 2012 10:56am

Lemme knw if you get a solution for this

Henri Sara
10 years ago Nov 28, 2012 11:06am