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
<ActionName>-<MethodName>-.xml

Thoughts?


On Fri, Jun 28, 2013 at 10:17 AM, Paul Benedict <pbened...@apache.org>wrote:

> 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 wanted to see if I may have overlooked the existence of the other.
>
>
> On Fri, Jun 28, 2013 at 3:46 AM, Rene Gielen <rene.gie...@gmail.com>wrote:
>
>> 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 or not. This is why I like to place @Validation /
>> @SkipValidation at the action method rather than enlisting this method
>> name
>> somewhere else. But that's just me...
>>
>> BTW - I wonder if it's time to rethink validation for Struts 3. JSR 303 ff
>> has become really mature and has some pretty advanced features (e.g.
>> validation groups). How about deprecating XWork validation in favor of JSR
>> 303 integration? BTW, since 303 was among others inspired by XWork
>> validation due to Jason Careira being on the initial EG, it wouldn't be
>> too
>> much of a break with our traditions :)
>>
>> - René
>>
>>
>> 2013/6/28 Maurizio Cucchiara <mcucchi...@apache.org>
>>
>> > 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 <pbened...@apache.org> wrote:
>> >
>> > > I was thinking it would be a good idea to add "String[] actions" on
>> the
>> > > validations. When empty, it means all methods; otherwise only the
>> methods
>> > > the validation should be executing with.
>> > >
>> > > I don't think there's a current way to do this except through XML.
>> > >
>> > > Thoughts?
>> >
>> >
>> >
>> >
>> > Twitter     :http://www.twitter.com/m_cucchiara
>> > G+          :https://plus.google.com/107903711540963855921
>> > Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
>> > VisualizeMe:
>> http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
>> >
>> > Maurizio Cucchiara
>> >
>>
>
>

Reply via email to