Skip to content Skip to sidebar Skip to footer

Disable `` After Clicked, But Action Should Be Fired

I have a in my XHTML page. I want the button to be disabled as soon as I click the button. Then the button should call the action. My button gets disabled a

Solution 1:

Use setTimeout , that way the action will be fired and the button will be disabled...

<h:commandButtonvalue="Go"onclick="setTimeout('this.disabled = true;', 50);"action="#{bean.go()}"/>

You can also take a look at the following question too :How can I disable an h:commandButton without preventing the action and actionListener from being called?

Post a Comment for "Disable `` After Clicked, But Action Should Be Fired"