You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Greg Pagendam-Turner <gr...@liftyourgame.com> on 2011/08/26 02:34:04 UTC

Bean Validation

What dependency provides: BeanValidatorSource ?

In my gradle build I have:

     compile group: 'org.apache.tapestry', name: 'tapestry-core', version: '5.2.6'
     compile group: 'org.apache.tapestry', name: 'tapestry-hibernate', version: '5.2.6'
     compile group: 'org.hibernate', name: 'hibernate-validator-annotation-processor', version: '4.1.0.Final'


but my IntelliJ project is not resolving BeanValidatorSource.

Also, onhttp://tapestry.apache.org/bean-validation.html  it talks about bootstraping the Bean Validator. I take it that this code goes in my AppModule?


@Contribute(BeanValidatorSource.class)
public  static  void provideBeanValidatorConfigurer(OrderedConfiguration<BeanValidatorConfigurer>  configuration)
{
    configuration.add("MyConfigurer",new  BeanValidatorConfigurer()
    {
       public  void configure(javax.validation.Configuration<?>  configuration)
       {
          configuration.ignoreXmlConfiguration();
       }
    });
}



Regards,

Greg.




Re: Bean Validation

Posted by Serge Eby <sd...@hotmail.com>.
You are missing the tapestry-beanvalidator in your gradle build file 

/Serge

--
View this message in context: http://tapestry-users.832.n2.nabble.com/Bean-Validation-tp6726904p6729278.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Bean Validation

Posted by Igor Drobiazko <ig...@gmail.com>.
yep, JSR 303 since 5.2 and JSR 330 since 5.3

On Fri, Aug 26, 2011 at 5:05 PM, Werner Keil <we...@gmail.com> wrote:

> Great to hear, the JSR is fully supported.
>
> Is Tapestry 5.2 or 5.3 also compatible with JSR 330 instead of declaring
> its
> own @Inject?
>
> --
>
>  Werner Keil | UOMo Lead | Eclipse.org
>
>  Twitter @wernerkeil | Skype: werner.keil | www.eclipse.org/uomo |
> #EclipseUOMo
>
> * JavaOne: October 2-6 2011, San Francisco, USA. Werner Keil, Agile Coach,
> UOMo Lead will co-present "JSR 321: Trusted Java API"
>



-- 
Best regards,

Igor Drobiazko
http://tapestry5.de

Re: Bean Validation

Posted by Taha Hafeez <ta...@gmail.com>.
Yes from 5.3 you can use javax.inject.Inject

http://blog.tapestry5.de/index.php/2011/08/22/tapestry-5-3-preview/



On Fri, Aug 26, 2011 at 8:35 PM, Werner Keil <we...@gmail.com> wrote:
> Great to hear, the JSR is fully supported.
>
> Is Tapestry 5.2 or 5.3 also compatible with JSR 330 instead of declaring its
> own @Inject?
>
> --
>
>  Werner Keil | UOMo Lead | Eclipse.org
>
>  Twitter @wernerkeil | Skype: werner.keil | www.eclipse.org/uomo |
> #EclipseUOMo
>
> * JavaOne: October 2-6 2011, San Francisco, USA. Werner Keil, Agile Coach,
> UOMo Lead will co-present "JSR 321: Trusted Java API"
>



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Bean Validation

Posted by Werner Keil <we...@gmail.com>.
Great to hear, the JSR is fully supported.

Is Tapestry 5.2 or 5.3 also compatible with JSR 330 instead of declaring its
own @Inject?

-- 

 Werner Keil | UOMo Lead | Eclipse.org

 Twitter @wernerkeil | Skype: werner.keil | www.eclipse.org/uomo |
#EclipseUOMo

* JavaOne: October 2-6 2011, San Francisco, USA. Werner Keil, Agile Coach,
UOMo Lead will co-present "JSR 321: Trusted Java API"

Re: Bean Validation

Posted by Igor Drobiazko <ig...@gmail.com>.
tapestry-beanvalidator depends only on JSR 303 specification. You need to
drop an implementation of the specification (like Hibernate Validator) on
the classpath. It is not provided by Tapestry.

Regarding contribution to BeanValidatorSource: you don't need to contribute
anything in order to bootstrap the validator. The configuration shown on the
docs is just an example for a programmatic validator configuration.

On Fri, Aug 26, 2011 at 2:34 AM, Greg Pagendam-Turner <greg@liftyourgame.com
> wrote:

> What dependency provides: BeanValidatorSource ?
>
> In my gradle build I have:
>
>    compile group: 'org.apache.tapestry', name: 'tapestry-core', version:
> '5.2.6'
>    compile group: 'org.apache.tapestry', name: 'tapestry-hibernate',
> version: '5.2.6'
>    compile group: 'org.hibernate', name: 'hibernate-validator-**annotation-processor',
> version: '4.1.0.Final'
>
>
> but my IntelliJ project is not resolving BeanValidatorSource.
>
> Also, onhttp://tapestry.apache.org/**bean-validation.html<http://tapestry.apache.org/bean-validation.html> it talks about bootstraping the Bean Validator. I take it that this code
> goes in my AppModule?
>
>
> @Contribute(**BeanValidatorSource.class)
> public  static  void provideBeanValidatorConfigurer**
> (OrderedConfiguration<**BeanValidatorConfigurer>  configuration)
> {
>   configuration.add("**MyConfigurer",new  BeanValidatorConfigurer()
>   {
>      public  void configure(javax.validation.**Configuration<?>
>  configuration)
>      {
>         configuration.**ignoreXmlConfiguration();
>      }
>   });
> }
>
>
>
> Regards,
>
> Greg.
>
>
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de