Two Laptop Bag*
The moose likes JSF and the fly likes Skip validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Skip validation" Watch "Skip validation" New topic

Skip validation

Ahmed Battah

Joined: Jan 18, 2009
Posts: 5
Hey Guys,

I have a bad case that I need a help in it as follow:

I'm using RAD 7.5 with WAS 6.1 to develop portlets, in one of my portlets I have a case in which I need to skip validation after I change the value selected in a dropdown menu. I'm using 'onchange="submit()"' and a valueChangeListener attributes of the dropDownMenu to populate some fields in the same page, but when the form submitted the fields were validated and many validation errors appeared, how can I skip validation in this case and avoid the appearance of the error messages.

can anyone give me a hand?

Thank you for help in advance.
Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
I have done this with autosubmit="true" and immediate="true" using MyFaces.
"autosubmit" means the change will get posted as soon as it is made (like your onchange) and "immediate" will skip validation when the value is "true".

I think RAD/WAS should offer something similar.



It is sorta covered in the JavaRanch Style Guide.
subject: Skip validation
Similar Threads
Skip form validation but update backing bean values
Can Spring mapping String to VARCHAR(75) bebigger?
Which is better
Custom Validator
Validating the fields in active tab alone