Re: Struts annotations limited to specific methods

2013-07-08 Thread Lukasz Lenart
2013/7/2 Paul Benedict : > My first idea was to add an "actions" attribute on the validator > annotations. For example: > > @RequredStringValidator(key="firstName", actions={ "execute", "forward" }) Or maybe method names? But then the same validation could be executed for different actions which m

Re: Struts annotations limited to specific methods

2013-07-02 Thread Paul Benedict
My first idea was to add an "actions" attribute on the validator annotations. For example: @RequredStringValidator(key="firstName", actions={ "execute", "forward" }) Lacking the attribute means all methods, of course. Thoughts? On Tue, Jul 2, 2013 at 1:37 AM, Lukasz Lenart wrote: > 2013/6/29

Re: Struts annotations limited to specific methods

2013-07-01 Thread Lukasz Lenart
2013/6/28 Umesh Awasthi : > I worked quite a bit on JSR 303 validations (Both with Hibernate Validation > as well Apache Bval) and also worked on creating plugin to integrate it > with Struts2, since with version 2.5/3.0 , we are looking to have some > major changes so was wondering if i should wai

Re: Struts annotations limited to specific methods

2013-07-01 Thread Lukasz Lenart
2013/6/29 Paul Benedict : > This is the best proposed solution and I am surprised it didn't become part > of Struts: > https://issues.apache.org/jira/browse/WW-1967 You can do it yourself right away ;-) > We should add another level of XML filename checking to to be > --.xml What about Annotatio

Re: Struts annotations limited to specific methods

2013-06-29 Thread Paul Benedict
This is the best proposed solution and I am surprised it didn't become part of Struts: https://issues.apache.org/jira/browse/WW-1967 We should add another level of XML filename checking to to be --.xml Thoughts? On Fri, Jun 28, 2013 at 10:17 AM, Paul Benedict wrote: > I am glad you're familiar

Re: Struts annotations limited to specific methods

2013-06-28 Thread Paul Benedict
I am glad you're familiar with validation groups -- because that's exactly what I was alluding to. I see the Struts 2 documentation allows me to target validation on a particular method through XML only; Struts 2 simply lacks the annotation counterpart. If today I have to use XML, okay, but just wa

Re: Struts annotations limited to specific methods

2013-06-28 Thread Umesh Awasthi
I worked quite a bit on JSR 303 validations (Both with Hibernate Validation as well Apache Bval) and also worked on creating plugin to integrate it with Struts2, since with version 2.5/3.0 , we are looking to have some major changes so was wondering if i should wait for Struts 2.5/ 3.0. On Fri,

Re: Struts annotations limited to specific methods

2013-06-28 Thread Rene Gielen
This sounds a bit like "inversion of control". As for me, I'd rather not like to have my model (which is to validate) to have knowledge about the business side validation is triggered from. When I develop from the action perpective, I know if the current method is better off triggering validation o

Re: Struts annotations limited to specific methods

2013-06-28 Thread Maurizio Cucchiara
Hi Paul, actually there is one way: using @SkipValidation combined with @Validation Or maybe I miss the point. Is there something better in your approach? On 28 June 2013 05:38, Paul Benedict wrote: > I was thinking it would be a good idea to add "String[] actions" on the > validations. When emp