Re: Annotation validation setter level

2018-01-08 Thread José Antonio Delgado Trujillo
Thanks a lot for the link and the explanation. Un saludo, José A. > On 6 Jan 2018, at 10:37, Hedju Hor wrote: > > Hi, use @VisitorFieldValidator > 1. in Action-Class annotad gettter Method of the model with > @VisitorFieldValidator > 2. @EmailValidator on getter in Model Person.getEmail > > s

Re: Annotation validation setter level

2018-01-06 Thread Hedju Hor
Hi, use @VisitorFieldValidator 1. in Action-Class annotad gettter Method of the model with @VisitorFieldValidator 2. @EmailValidator on getter in Model Person.getEmail see https://depressedprogrammer.wordpress.com/2007/05/10/struts-2-validation-using-annotations/ Regards Hedju Hor On 2018-01-

Re: Annotation Validation

2010-04-29 Thread Alex Rodriguez Lopez
I did try it like so, it is working, but not as expected. I need to pass an argument to the resource bundle so it gets correclty displayed with the name, for example this property: error.required = Field {0} is required. When called like this: getText("error.required", {getText("label.name")})

Re: Annotation Validation

2010-04-28 Thread mrsv
Did you try something like this? @RequiredStringValidator( fieldName = "label.name", key ="error.required ", message = "Name required.")} Alex Rodriguez Lopez wrote: > > Hi struts users! > > I'm on my way to change from XML based validation to annotation > validation.

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Don Brown
On Nov 8, 2007 12:29 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- Gary Affonso <[EMAIL PROTECTED]> wrote: > > > Look at the "Dynamic Method Invocation" section, > > > 1/2-2/3 of the way down. > > Well, that explains it. The wildcard feature seems > > to come from s1 (which I never used) and

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Gary Affonso
Dave Newton wrote: --- Gary Affonso <[EMAIL PROTECTED]> wrote: > Look at the "Dynamic Method Invocation" section, > 1/2-2/3 of the way down. Well, that explains it. The wildcard feature seems to come from s1 (which I never used) and the "dynamic method invocation" feature wasn't very well d

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Dave Newton
--- Gary Affonso <[EMAIL PROTECTED]> wrote: > > Look at the "Dynamic Method Invocation" section, > > 1/2-2/3 of the way down. > Well, that explains it. The wildcard feature seems > to come from s1 (which I never used) and the > "dynamic method invocation" feature wasn't > very well documented

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Gary Affonso
Dave Newton wrote: Curiously, action!input is not a part of the framework I'm familiarwith. Can you point me to some docs that describe it? > > http://struts.apache.org/2.x/docs/action-configuration.html > > Look at the "Dynamic Method Invocation" section, > 1/2-2/3 of the way down. Well, that

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Dave Newton
--- Jeromy Evans <[EMAIL PROTECTED]> wrote: > Dave, does that mean you don't favour one approach > over the other? ie. happy with multiple methods per action? I have no clear preference right now. I tend not to have a lot of methods in my actions anyway, but I'll group stuff together when it seems

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Jeromy Evans
Dave Newton wrote: Again, not one *method*. That'd be crazy! That's what's being discussed, I'm pretty sure, but with an eye towards a different "prepare" cycle: the whole Preparable lifecycle makes more sense if there are multiple (request-handling) methods in an Action class. If there's

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Dave Newton
--- Gary Affonso <[EMAIL PROTECTED]> wrote: > Ted Husted wrote: >> Meanwhile, in Struts 1 there is a "DispatchAction" >> that does much the same thing. From other >> discussions, I gather that "multiple actions per >> controller" is considered a Good Thing on platforms >> like Ruby on Rails. It's

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Gary Affonso
Ted Husted wrote: On Nov 6, 2007 8:10 PM, Gary Affonso <[EMAIL PROTECTED]> wrote: For some reason folks new to s2 seem to get it backwards and want to stuff a bunch of Action methods into a single Action class. It's probably because the standard S2/WW validation workflow implies that an Action

How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Ted Husted
On Nov 6, 2007 8:10 PM, Gary Affonso <[EMAIL PROTECTED]> wrote: > For some reason folks new to s2 seem to get it backwards and want to > stuff a bunch of Action methods into a single Action class. It's probably because the standard S2/WW validation workflow implies that an Action class will have m

Re: Annotation Validation, per method?

2007-11-06 Thread Gary Affonso
Ted Husted wrote: Of course, if you use one-action-method per Action-class, then all the annotations work just fine. +1 on one-action-method per Action class. My personal opinion (after nearly 5 years of heavy WebWork/s2 use) is that this is the best-practice and that multiple action methods

Re: Annotation Validation, per method?

2007-11-06 Thread Ted Husted
d than the xml version? > > > > - Original message - > From: "Fátima Silveira" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Date: Mon, 5 Nov 2007 17:58:32 +0100 > Subject: Re: Annotation Validation, per method? > > i dont know to use anotat

Re: Annotation Validation, per method?

2007-11-06 Thread Martin Gilday
Thanks. Is this not a severe limitation of the annotation version if it is more limited than the xml version? - Original message - From: "Fátima Silveira" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Date: Mon, 5 Nov 2007 17:58:32 +0100 Subject: Re:

Re: Annotation Validation, per method?

2007-11-05 Thread Fátima Silveira
i dont know to use anotation but with xml is ClassName-actionAlias_method- validation.xml On 11/5/07, Martin Gilday <[EMAIL PROTECTED]> wrote: > > Can you have annotation validation per method? I have put @Validations > on both my display and update methods (display shows the record from > input)