8 Replies Latest reply on Jan 15, 2010 6:46 PM by dmdm

    Profiles attribute is missing in BeanValidator

      Hi

      In the docs it is mentioned that there is an attribute called profiles for rich:beanValidator tag but at the runtime it could not find any handler for that attribute !!!!

      Further for rich:GraphValidator, there is an attribute for profiles but it looks like it doesn't do any thing.

      I need to use these tags in conjunction with the  JSR303 bean validation groups.

      Any one knows workaround or any other way to specify the groups??

      Thanks and Regards

        • 1. Re: Profiles attribute is missing in BeanValidator
          nbelaevski

          Hello,

           

          dmdm wrote:

           

          ... at the runtime it could not find any handler for that attribute !!!!

          Please clarify on this.

           

          dmdm wrote:

           

          Further for rich:GraphValidator, there is an attribute for profiles but it looks like it doesn't do any thing.

          What's your RF version?

          • 2. Re: Profiles attribute is missing in BeanValidator

            Richfaces version 3.3.2

            and

            Hibernate validator version 4.0.2.GA as implementation for JSr303

             

            Thanks and Regards

            • 3. Re: Profiles attribute is missing in BeanValidator

              When I run the bean validator l get this following message

               

              /test.xhtml @26,23 profiles="#{Default}" Unhandled by MetaTagHandler for type org.richfaces.validator.FacesBeanValidator


              • 4. Re: Profiles attribute is missing in BeanValidator

                Graph validator is working now ...my bad I specified the groups in incorrect expression.

                But Bean validator is still missing the attribute

                I looked at the source code and it is mentioned that bean validator has been depricated and ajaxvalidator should be used ...I tried ajaxValidator and it worked well.

                Should we not use the bean validator?

                Thanks and Regards

                Deepesh

                • 5. Re: Profiles attribute is missing in BeanValidator
                  azakovorotny

                  I found no indication on BeanValidator deprecation in RichFaces 3.3.2 source.

                  I tried to use simple example from RichFaces demo with an integer property annotated with @Min and @Max and got this problem:

                  javax.validation.ValidationException: Unable to find a default provider

                  at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264)...

                   

                  Could anybody provide instructions on what packages are required and how to configure deployment, please? I have hibernate-validator-3.1.0.GA in classpath.

                   

                  Thanks in advance.

                   

                  Andy.

                  • 6. Re: Profiles attribute is missing in BeanValidator

                    Try using Hibernate Vallidator 4 ...I believe the JSR303 implementation starts from version 4

                    I  am using 4

                    Cheers

                    • 7. Re: Profiles attribute is missing in BeanValidator
                      azakovorotny

                      Thanks Deepesh,

                       

                      I get the same error  with hibernate-validator-4.X:

                       

                      javax.validation.ValidationException: Unable to find a default provider

                      at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264)...

                       

                      Cannot figure out why DefaultValidationProviderResolver returns empty list of providers... Why does bean validation work on RichFaces demo site

                       

                      Regards,

                      Andy.

                      • 8. Re: Profiles attribute is missing in BeanValidator

                        Have you tried testing validation without the richfaces ...just to make sure your validator is properly set up

                        I do not remember setting anything special and its working allright with the Hv4  ...but I shall look again