I got a problem like this
I have 2 mothods caled edit() and create() I used annotation based
validation
but tthing is i want to validate some of experssions in edit method and some
of the in create() method
cant use @skipValidation in this
my problem is i can not difine this seperatly in my
@struts.apache.org
Subject: RE: S2 : Validation per Action method - ideas?
I got a problem like this
I have 2 mothods caled edit() and create() I used annotation based
validation
but tthing is i want to validate some of experssions in edit method and
some
of the in create() method
cant use @skipValidation
You should have a look at this one:
http://www.nabble.com/Re%3A-S2-%3A-Validation-per-Action-method---ideas--p12753992.html
I ended up following this lead, and it works nice.
Or you could try this:
http://www.nabble.com/Re%3A-S2-%3A-Validation-per-Action-method---ideas--p12090749.html
beto
I opened
* https://issues.apache.org/struts/browse/WW-2191
for this, and noted the setting in the Validators documentation.
Thanks for pointing this out, Veronica!
-Ted.
On 8/10/07, Veronica Iturrioz [EMAIL PROTECTED] wrote:
You must to set the property validateAnnotatedMethodOnly=true, and
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: S2 : Validation per Action method - ideas?
I opened
* https://issues.apache.org/struts/browse/WW-2191
for this, and noted the setting in the Validators documentation.
Thanks for pointing this out, Veronica!
-Ted.
On 8/10/07
?
Or is this not possible?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Ted Husted
Sent: 18 September 2007 10:27
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: S2 : Validation per Action method - ideas?
I opened
* https
wanting different validation. This can get messy.
Regards
David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Ted Husted
Sent: 18 September 2007 11:12
To: Struts Users Mailing List
Subject: Re: S2 : Validation per Action method - ideas?
* http
David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Ted Husted
Sent: 18 September 2007 11:12
To: Struts Users Mailing List
Subject: Re: S2 : Validation per Action method - ideas?
* http://struts.apache.org/2.x/docs/validation.html
It's
the reuse of a JSP that maybe used by more than one action.
-Original Message-
From: cilquirm [mailto:[EMAIL PROTECTED]
Sent: 18 September 2007 15:41
To: user@struts.apache.org
Subject: RE: S2 : Validation per Action method - ideas?
I'm not sure I follow how validation is more flexible
With some work, the annotations could be as flexible as the XML
validations. The messy problem in either case is being able to express
when and when-not to inherit validations from parent classes.
Right now, you can shut off the inheritance of validations (as
Veronica described), but it shuts off
-Message d'origine-
De : beto [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 10 août 2007 10:57
À : user@struts.apache.org
Objet : RE: S2 : Validation per Action method - ideas?
Hi.
I've tried using validation annotation (which works great) and ran into
the
scenario mentioned
annotations on
the
field setters?
-Message d'origine-
De : beto [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 10 août 2007 11:56
À : user@struts.apache.org
Objet : RE: S2 : Validation per Action method - ideas?
Hi again, and thank you for your answer.
I've tried using @Validations
for server validation, not for client validation.
Anybody know how to resolve that for client validations?
Veronica.
- Original Message
From: beto [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Friday, August 10, 2007 8:54:02 AM
Subject: RE: S2 : Validation per Action method - ideas
and check
what happens.
-Message d'origine-
De : beto [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 10 août 2007 13:21
À : user@struts.apache.org
Objet : RE: S2 : Validation per Action method - ideas?
Yes, I removed the annotations from the setters. I might be overlooking
something
happens.
-Message d'origine-
De : beto [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 10 août 2007 13:21
À : user@struts.apache.org
Objet : RE: S2 : Validation per Action method - ideas?
Yes, I removed the annotations from the setters. I might be overlooking
something, but I'm not sure where
Pretty strange indeed. Did you remove all the validation annotations on the
field setters?
-Message d'origine-
De : beto [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 10 août 2007 11:56
À : user@struts.apache.org
Objet : RE: S2 : Validation per Action method - ideas?
Hi again, and thank
Hi.
I've tried using validation annotation (which works great) and ran into the
scenario mentioned by Joseph. I have different action methods which requires
different set of validation rules. I can not find out how to set up
validation annotation to differentiate the validation rules based on
: beto [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 10 août 2007 10:57
À : user@struts.apache.org
Objet : RE: S2 : Validation per Action method - ideas?
Hi.
I've tried using validation annotation (which works great) and ran into the
scenario mentioned by Joseph. I have different action methods which
You should check the Javadoc of the
com.opensymphony.xwork2.validator.annotations.Validation annotation.
Syntax example:
@Validations(
requiredFields =
[EMAIL PROTECTED](type = ValidatorType.SIMPLE,
fieldName = customfield, message = You must enter a value for
Specify your validation rules in a file called
MyActionClass-myAction-validation.xml where MyActionClass is the
action class and myAction is the name of the action being executed.
So your struts.xml would look something like:
action name=myAction class=MyActionClass method=myMethod.../action
20 matches
Mail list logo