Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to disable button immediately after click?

874788Oct 24 2011 — edited Oct 25 2011
Hello,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2011
Added on Oct 24 2011
9 comments
3,796 views