Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to stop form submission in <h:commandButton>

843844Sep 7 2009 — edited Sep 8 2009
Hi

I have a <h:commandButton> within my form. I tried attaching a javascript handler for 'onclick' event of the button.
In the javascript method, i validate a field in form and stop the form submission in the onclick.

But i am not able to do it. All times form is getting submitted.( i do not want to go for trinidad for client side form validations )
How can i achieve, to stop the form submission, if i use <h:commandButton>


Thanks
-vijay
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2009
Added on Sep 7 2009
8 comments
6,169 views