This content has been marked as final.
Show 3 replies
-
1. Re: Validate check boxes?
riotrellik Jul 6, 2010 4:34 PM (in response to riotrellik)So been messing around, searching like crazy,
And I have an idea, what if I add a function to the bean that has an if / else statement that would logically run through and make sure that at least one of the two checkboxes was checked?
public void validateSiteCreation(userParticipantAccess,userSponsorAccess) { if ( userParticipantAccess.equals(null) && ( userSponsorAccess.equals(null) { //reject submission } else if ( userParticipantAccess.equals(!null) && ( userSponsorAccess.equals(null) { //send submission } else if ( userParticipantAccess.equals(null) && ( userSponsorAccess.equals(!null) { //send submission } };
-
2. Re: Validate check boxes?
nbelaevski Jul 6, 2010 5:47 PM (in response to riotrellik)Hi Pete,
Take a look at rich:graphValidator. Another options are discussed in this thread: http://community.jboss.org/thread/139135?tstart=0 or search Google for examples of cross-field AJAX validtion.
-
3. Re: Validate check boxes?
riotrellik Jul 7, 2010 9:05 AM (in response to nbelaevski)Thanks for the direction Nick, still reads alot like greek, but working on it!