4 Replies Latest reply on Jul 12, 2011 10:54 AM by jnt30

    rich:graphValidator and groups is not working

    iabughosh

      Dears,

      I am using rich:graphValidator in my app, if there is no groups (default), everything is working fine, but when i add groups attribute to rich:graphValidator, no changes occur, it will only validate the attributes with no gourps (default), how can i activate groups with rich:graphValidator.

       

      enviroment :

      JDK 1.6

      JSF 2 + RichFaces 4

      Tomcat 6

      hibernate bean validation.

       

      thanks in advance.

        • 1. Re: rich:graphValidator and groups is not working
          jjamrich

          Hi,

             since there is not too much examples for graphValidator (or groups are not used in showcase demo), I would like to notice that you have to provide groups attribute value as array of java.lang.Class objects.

           

          You can find example of graphValidator with validation groups in example in our Metamer testing application.

           

          Message was edited by: Ján Jamrich

          1 of 1 people found this helpful
          • 2. Re: rich:graphValidator and groups is not working
            iabughosh

            thanks for the reply, but even when i add groups attribute to the graphValidator it doesn't work, it will only validate the bean attributes that belongs to no group, i noticed in your example that you are using the (type) attribute, what is used for ?

             

            thanks.

            • 3. Re: rich:graphValidator and groups is not working
              iabughosh

              thanks it works when the groups value is an array of classes Class[], but what is the type attribute for ?

              • 4. Re: rich:graphValidator and groups is not working
                jnt30

                I don't believe it does need to be an array of classes, one thing that you do need though is the fully qualified name of the class.  We use a few standard groups in our application and we are able to use their fully qualified name as a string in the Groups attribtue directly such as:

                 

                <rich:graphValidator value="#{someBindingExpression}" groups="com.company.SearchGroup"> ...

                 

                The fully qualified name did trip us up for a bit.