How to disable button immediately after click?
874788Oct 24 2011 — edited Oct 25 2011Hello,
I'm using JDeveloper 11.1.1.4.0
On my screen is an 'Add' button that calls specific method written in bean (addAction). Following are actions in addAction():
1. Disable Add button
2. Execute 'CreateInsert'
3. adfContext.addPartialTarget(corresponding adf table)
This works fine when user clicks on 'Add' and waits for couple of seconds, till the 'Add' button gets disabled
However, if the user keeps on clicking 'Add' button, it sends multiple requests to server and adds those many records in 'adf table'.
Is there any way to stop user input till the response is received for the previous request?
I tried setting up 'blocking' property of the button. But it did not work.
I also tried using 'unsecure' property of the button for disabled property and call setProperty('disabled',true) in javascript. In this case server request is not sent.
Appreciate your help in this regard.
Amar