This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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)"/>  
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:commandButton onclick returns false but action still executed
 
Similar Threads
Javascript in JSF
Problem with double INVOKE APPLICATION in JSF 2.0
JSF 1.2 & RichFaces - Open new pdf window based on required field validation errors
How to refresh the parent page when the child window is submitted?
How to Call the Backing Bean Method from javascript in JSF