You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Moore <pa...@amplafi.com> on 2009/06/24 20:17:56 UTC

Tapestry 5 and JSR-303 plans?

Hi there --

I just found out about JSR-303 ( bean validation JSR ). It may be too soon
to ask.....

but any plans on implementing this JSR inside of Tapestry?

Patrick Moore
Amplafi
http://amplafi.com
650-207-9792
"Amplafi enables businesses, professional organizations, bands, and other
organizations to replicate their  joint marketing efforts on the internet."
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog

Re: Tapestry 5 and JSR-303 plans?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, Jun 25, 2009 at 4:21 AM, Olle Hallin<ol...@gmail.com> wrote:
> Ideally, there should be a pluggability layer here.

As long as the validation is defined by an annotation in a getter or
field and it doesn't depend on other properties (@NotNull, @Length,
etc), the plugabillity layer is already there:
ValidationConstraintsGenerator. What's not pluggable yet
cross-property validation (@AssertTrue, @AssertFalse, etc).

For validation framework-independency, I don't think tapestry-core
should support any framework. This support should come as separate
drop-in packages (tapestry-beans-validation, etc).

> I started using Hibernate Validator a couple of years ago, but abandoned it
> since it's not multi-lingual. (see
> http://opensource.atlassian.com/projects/hibernate/browse/HV-44).

I used the Hibernate Validator support basically as a proof-of-concept
and an example to anyone who wants to support other validation
frameworks.

-- 
Thiago

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


Re: Tapestry 5 and JSR-303 plans?

Posted by Olle Hallin <ol...@gmail.com>.
Ideally, there should be a pluggability layer here.

I started using Hibernate Validator a couple of years ago, but abandoned it
since it's not multi-lingual. (see
http://opensource.atlassian.com/projects/hibernate/browse/HV-44).

Now I use JaValid instead. Similar feature set, but better implementation.
JSR-303 is yet another validation framework.

Just my 2c.

Olle


2009/6/24 Thiago H. de Paula Figueiredo <th...@gmail.com>

> Em Wed, 24 Jun 2009 15:17:56 -0300, Patrick Moore <pa...@amplafi.com>
> escreveu:
>
>  Hi there --
>>
>
> Hi!
>
>  I just found out about JSR-303 ( bean validation JSR ). It may be too soon
>> to ask.....
>>
>
> A little bit, as it was not approved tyet..
>
>  but any plans on implementing this JSR inside of Tapestry?
>>
>
> I implemented something very similar, but with Hibernate Validator, so it
> must be easy, as JSR 303 looks like Hibernate Validator standerdized and
> more powerful :). It is in an unreleased version of Tapestry CRUD-Hibernate
> Validator (
> http://www.arsmachina.com.br/project/tapestrycrudhibernatevalidator, you
> can find sources there) It has two parts: some classes that implement
> ValidationConstraintGenerator, automatically adding the required validation
> for properties annotated with @NotNull, for example, and a mixin,
> HibernateValidatorMixin, that executes all the validations again, including
> the ones defined by @AssertTrue and @AssertFalse, in BaseEditPage (from
> Tapestry CRUD) subclasses.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Olle Hallin
Senior Java Developer and Architect
olle.hallin@crisp.se
www.crisp.se

Re: Tapestry 5 and JSR-303 plans?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 24 Jun 2009 15:17:56 -0300, Patrick Moore <pa...@amplafi.com>  
escreveu:

> Hi there --

Hi!

> I just found out about JSR-303 ( bean validation JSR ). It may be too  
> soon to ask.....

A little bit, as it was not approved tyet..

> but any plans on implementing this JSR inside of Tapestry?

I implemented something very similar, but with Hibernate Validator, so it  
must be easy, as JSR 303 looks like Hibernate Validator standerdized and  
more powerful :). It is in an unreleased version of Tapestry  
CRUD-Hibernate Validator  
(http://www.arsmachina.com.br/project/tapestrycrudhibernatevalidator, you  
can find sources there) It has two parts: some classes that implement  
ValidationConstraintGenerator, automatically adding the required  
validation for properties annotated with @NotNull, for example, and a  
mixin, HibernateValidatorMixin, that executes all the validations again,  
including the ones defined by @AssertTrue and @AssertFalse, in  
BaseEditPage (from Tapestry CRUD) subclasses.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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