File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Murach's Java Servlets and JSP this week in the Servlets 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
How to Call the Backing Bean Method from javascript in JSF
How to refresh the parent page when the child window is submitted?
Problem with double INVOKE APPLICATION in JSF 2.0
Javascript in JSF
JSF 1.2 & RichFaces - Open new pdf window based on required field validation errors