disabiling a button after the click in JSF
Hi...,
For one of the screen, the request takes some time for to complete & redirect the user to a new page. What we don't want is for the user to click on the button multiple time .
When we use the onClick event on the button to disable , it works fine, but then the request is not completed.
How do I make the request go through even after I disable the button?
Regards,
Praveen
[424 byte] By [
pmohanana] at [2007-11-27 8:47:04]

# 2
Hi..Martin,
Here is the code :
<h:commandButton onclick="this.disabled='true'; return false;" value="Next" action="#{UserBean.next}" type="submit"/>
Can you please tell me what is wrong in this code? I even tried :
<h:commandButton onclick="this.disabled='true'; document.test.submit(); return false;" value="Next" action="#{UserBean.next}" type="submit"/>
Both the codes disable the button but then don't complete the next step.
Regards,
Praveen