Loading...
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
TUTORIAL

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

Disable double click

Ferenc Csendes
5 years ago Feb 10, 2017 12:01pm
Olli Tietäväinen
5 years ago Feb 10, 2017 12:56pm

Hi,

maybe you can check if the window is open and not open if that's true?

-Olli

Ferenc Csendes
5 years ago Feb 10, 2017 1:15pm
Olli Tietäväinen
5 years ago Feb 10, 2017 1:31pm
Jonas Ohlsson
5 years ago Feb 10, 2017 4:50pm

There is a function on buttons called setDisableOnClick that you might find interesting?

Ferenc Csendes
5 years ago Feb 14, 2017 7:40am

So, the solution for me.
I create handlingOpenWindow() method, which I call at the buttonClick. That method set the button setEnabled(false), and containing a window.addCloseListener where I change the button setEnabled(true). The method inside parameters are "Window window, Button button".

Only one problem with this. I have to check the whole system where we are use window, which opening by button click. 

BTW Thank you guys. 

Olli Tietäväinen
5 years ago Feb 14, 2017 7:47am
Ferenc Csendes
5 years ago Feb 14, 2017 8:24am
Michal Lichvar
6 months ago Apr 20, 2021 2:29pm
Michal Lichvar
6 months ago Apr 21, 2021 8:43am