aspose file tools*
The moose likes JSF and the fly likes h:commandButton onclick returns false but action still executed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "h:commandButton onclick returns false but action still executed" Watch "h:commandButton onclick returns false but action still executed" New topic
Author

h:commandButton onclick returns false but action still executed

Joe Walt
Greenhorn

Joined: Sep 28, 2012
Posts: 8
I have a h:commandButton that is suppose to perform and action if form validation returns true. if form validation returns false the same screen should be displayed with errors. When there are errors on the form the screen is redisplayed showing the errors but then the action is preformed a few seconds later. I was told that this is caused by an add-on from publisher “Conduit Ltd”. If I disable this add-on it fixes the problem but I am hoping to find a solution that does not require disabling this add-on.


<h:commandButton value="#{msg.ui024_button_checkout}"
class="button"
action="#{checkoutBacking.executeCheckoutProcess}"
onclick="return validateCheckOut(this.form)"
onfocus="markNoError(this)"/>  
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: h:commandButton onclick returns false but action still executed