Closed robert-lee-hisl closed 4 years ago
Hi @robert-lee-hisl, instead of the protected setDisabled(false)
, use the public setEnabled(true)
@tomivirkki Thank you for your reply; setEnabled(true) does indeed seem to work.
It's odd, because setDisabled(false) has worked in previous versions, and makes more sense with the "setDisabledOnClick" nomenclature.
The "setDisableOnClick" function is useful to stop the backend from spawning multiple threads in response to repeated mouse clicks on the button.
However, if the server returns synchronously, then the button is not enabled.
Using Vaadin 14.1.16
The button should only be disabled while the client is communicating with the server, and re-enabled when "setDisabled(false)" is called, indicating that the server is ready for new work.
Instead, it remains disabled, because the server doesn't know that the disabled property has been set by this time, so it doesn't see a change in the disabled flag, so doesn't propagate it to the client.
Workaround is to put the "setDisabled(false)" into a background thread.