Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to start a delayed action
I'm explaining :
A user click on a button A
on click button A: after a delay -> set button A disabled
the delay must be executed in js on IHM, et after the delay ,button need to be refresh by a call from IHM to SERVER.
I don't quite see why it's a problem that the Button-clicked-Event is sent immediately on the server -- you could set a timer on the server side and after a while then disable the button.
This is relatively easy and basically what you need if I only read the part above the "====".
Plain Java, using e.g. Thread.wait() and some locking.
If you're really sure you want to change the button behaviour on the client (browser) side, then you will have to build your own custom component.
Thanks a lot for this response.
In fact, my real problem is a with an event blur (from a textfield) which arrive before a clickevent (from a button).
| text field | button VALID |
on blur event textfield => buttonVALID is set enabled, and textfied is set not editabled :: CANCEL
on click event button => saving data on bdd :: VALIDATION
When you click on button VALID => first focus event is managed before click event, and buttonVALID is never clicked...