This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSF and the fly likes Two validators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Two validators" Watch "Two validators" New topic
Author

Two validators

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
Hi, I was wondering someone can answer this question for me.

I have implement two backing bean validator methods, when I click the save button, only one get invoked. What can I do make both run?

in xhtml like


thanks
Davie
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

Put valid data in the input controls.

Seriously, when a form is submitted, ALL the validators get invoked. That's how JSF is able to display separate messages for each invalid input.

Of course, you seem to have defined inputs that have no place to input to (no 'value=' attributes). which is an entirely different problem.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Don't get me started about those stupid light bulbs.
 
subject: Two validators