JSF form does not get submitted when form is disabled by JavaScript

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-05-17T20:21:55Z Indexed on 2010/05/18 17:00 UTC
Read the original article Hit count: 141

Filed under:
|
|

This is the submit button:

<h:commandButton 
    actionListener="#{regBean.findReg}" 
    action="#{regBean.navigate}" value="Search" />

This is the form:

<h:form onsubmit="this.disabled=true;busyProcess();return true;">

If the submit button is pressed, the page shows a "busy" icon until request is processed. The problem is, the form is never submitted and the request never reaches the backend. However, if I instead take out the "disabled" call like so:

<h:form onsubmit="busyProcess();return true;">

Then everything works. Any ideas?

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf