3 Replies Latest reply on Jul 7, 2010 9:05 AM by Pete Schroeder

    Validate check boxes?

    Pete Schroeder Newbie

      I have been given a project that uses RichFaces... I have never used it, and don't know much about AJAX or JS.

       

      What I am doing, or trying to do is have two checkboxes, I need at least one of them to be chosen, and I need it to not submit if at least one or both is not checked.

       

      I have figured out the very easy to use form field validation, but have found no documentation or example of a multiple check box validation.

       

      Any help would be greatly appriciated.

       

      Thanks you.

       

      example code:

       

       

      <h:selectBooleanCheckbox title="participantAccess" value="#{dcSite.userParticipantAccess}" />PARTICIPANT
      <f:verbatim>
      <br />
      </f:verbatim>
      <h:selectBooleanCheckbox title="sponsorAccess" value="#{dcSite.userSponsorAccess}" />SPONSOR
      
      
      

       

      if this were ActionScript I would right a function that would see if one or both had been checked, but I am not sure how to go about this in this.