|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Bean Validation APIHi All,
is there any plan to incorporate the new validation API into trais? This would also mean using hibernate validator 4.0.0.GA. We want to use it in our projects, but since the annotations changed the package I'm afraid our trails code won't work. Am I right?
Thanks.
|
|
|
Re: Bean Validation APIHi Pablo
Are you using the 1.2 version? I think it should be pretty easy to incorporate, only two classes need to change (I think): HibernateClassValidatorFactory and HibernateValidationDelegate But there is no plan to incorporate hibernate-validator 4.0.0 in the Trails 1.2.x branch. We can (and will) do it in the new Tynamo (fka Trails2) release, tough. Saludos. Alejandro. On Wed, Oct 21, 2009 at 4:24 PM, Pablo Saavedra <pablo.a.saavedra@...> wrote: > Hi All, > is there any plan to incorporate the new validation API into trais? This > would also mean using hibernate validator 4.0.0.GA. We want to use it in our > projects, but since the annotations changed the package I'm afraid our > trails code won't work. Am I right? > Thanks. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Bean Validation APIGracias for the quick reply. Is it possible to, instead of modifying the existing validators, provide new validator implementatons? i.e. BeanValidationClassValidatorFactory and BeanValidationDelegate?
If so, I'd prefer to go in that direction. Otherwise, I'll see if i can come up with a patch.
Regards.
2009/10/21 Alejandro Scandroli <ascandroli@...> Hi Pablo |
|
|
Re: Bean Validation APIHi Pablo
The HibernateClassValidatorFactory is used by the HibernateValidationAspect and is applied on compile time, so it will be tricky to just provide a new factory and a new delegate, because you will still need to remove the call to the old one from the compiled code. The easiest path will be to remove the HibernateValidationAspect for good. Then extended the HibernatePersistenceServiceImpl and make it explicitly call your new validation methods before "save" and "merge". But you are going to need to recompile anyway. On a related note, today the Tapestry5 team started to work on a tapestry-beanvalidator module for the Tapestry5/JSR-303 integration. Cheers. Alejandro. On Wed, Oct 21, 2009 at 7:19 PM, Pablo Saavedra <pablo.a.saavedra@...> wrote: > Gracias for the quick reply. Is it possible to, instead of modifying the > existing validators, provide new validator implementatons? i.e. > BeanValidationClassValidatorFactory and BeanValidationDelegate? > If so, I'd prefer to go in that direction. Otherwise, I'll see if i can come > up with a patch. > Regards. > > 2009/10/21 Alejandro Scandroli <ascandroli@...> >> >> Hi Pablo >> >> Are you using the 1.2 version? >> I think it should be pretty easy to incorporate, only two classes need >> to change (I think): HibernateClassValidatorFactory and >> HibernateValidationDelegate >> But there is no plan to incorporate hibernate-validator 4.0.0 in the >> Trails 1.2.x branch. >> We can (and will) do it in the new Tynamo (fka Trails2) release, tough. >> >> Saludos. >> Alejandro. >> >> On Wed, Oct 21, 2009 at 4:24 PM, Pablo Saavedra >> <pablo.a.saavedra@...> wrote: >> > Hi All, >> > is there any plan to incorporate the new validation API into trais? This >> > would also mean using hibernate validator 4.0.0.GA. We want to use it in >> > our >> > projects, but since the annotations changed the package I'm afraid our >> > trails code won't work. Am I right? >> > Thanks. >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Bean Validation APIHi Alejamdro,
we are not based our applications, rather using them as a module for quick CRUD generation (you might know the concrete case), so we won't update to tapestry 5 and we are probably not going to upgrade to trails 2.0 (since you dropped spring).
What I was thinking was maybe creating a new aspect and a new class validator factory. The problem is that it'd require to extend the delegate to handle JSR303 errors instead of InvalidStateException.
I'll do some experiments with the source and let you know how it goes in case you are interested. Regards.
2009/10/22 Alejandro Scandroli <ascandroli@...> Hi Pablo |
|
|
Re: Bean Validation APIHi Pablo
We dropped Spring, but we remain fully compatible. So unless you were using Spring to heavily interact with the Trails internals, I think it should be fairly easy to upgrade If you don't mind, can you tell me how are you using Spring, and what do you think is missing in the new Tapestry5 version. Alejandro. On Fri, Oct 23, 2009 at 4:38 PM, Pablo Saavedra <pablo.a.saavedra@...> wrote: > Hi Alejamdro, > we are not based our applications, rather using them as a module for quick > CRUD generation (you might know the concrete case), so we won't update to > tapestry 5 and we are probably not going to upgrade to trails 2.0 (since you > dropped spring). > What I was thinking was maybe creating a new aspect and a new class > validator factory. The problem is that it'd require to extend the delegate > to handle JSR303 errors instead of InvalidStateException. > I'll do some experiments with the source and let you know how it goes in > case you are interested. > Regards. > > 2009/10/22 Alejandro Scandroli <ascandroli@...> >> >> Hi Pablo >> >> The HibernateClassValidatorFactory is used by the >> HibernateValidationAspect and is applied on compile time, so it will >> be tricky to just provide a new factory and a new delegate, because >> you will still need to remove the call to the old one from the >> compiled code. >> >> The easiest path will be to remove the HibernateValidationAspect for >> good. Then extended the HibernatePersistenceServiceImpl and make it >> explicitly call your new validation methods before "save" and "merge". >> But you are going to need to recompile anyway. >> >> On a related note, today the Tapestry5 team started to work on a >> tapestry-beanvalidator module for the Tapestry5/JSR-303 integration. >> >> Cheers. >> Alejandro. >> >> On Wed, Oct 21, 2009 at 7:19 PM, Pablo Saavedra >> <pablo.a.saavedra@...> wrote: >> > Gracias for the quick reply. Is it possible to, instead of modifying the >> > existing validators, provide new validator implementatons? i.e. >> > BeanValidationClassValidatorFactory and BeanValidationDelegate? >> > If so, I'd prefer to go in that direction. Otherwise, I'll see if i can >> > come >> > up with a patch. >> > Regards. >> > >> > 2009/10/21 Alejandro Scandroli <ascandroli@...> >> >> >> >> Hi Pablo >> >> >> >> Are you using the 1.2 version? >> >> I think it should be pretty easy to incorporate, only two classes need >> >> to change (I think): HibernateClassValidatorFactory and >> >> HibernateValidationDelegate >> >> But there is no plan to incorporate hibernate-validator 4.0.0 in the >> >> Trails 1.2.x branch. >> >> We can (and will) do it in the new Tynamo (fka Trails2) release, tough. >> >> >> >> Saludos. >> >> Alejandro. >> >> >> >> On Wed, Oct 21, 2009 at 4:24 PM, Pablo Saavedra >> >> <pablo.a.saavedra@...> wrote: >> >> > Hi All, >> >> > is there any plan to incorporate the new validation API into trais? >> >> > This >> >> > would also mean using hibernate validator 4.0.0.GA. We want to use it >> >> > in >> >> > our >> >> > projects, but since the annotations changed the package I'm afraid >> >> > our >> >> > trails code won't work. Am I right? >> >> > Thanks. >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe from this list, please visit: >> >> >> >> http://xircles.codehaus.org/manage_email >> >> >> >> >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |