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]
# 1
Disabling the button does not prevent the server from going through with your request. The problem lies somewhere else.
martin_dubuca at 2007-7-12 20:51:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 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

pmohanana at 2007-7-12 20:51:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...