You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Amadei <da...@gmail.com> on 2007/02/10 04:33:02 UTC

[S2] question on validation

Hi All,

Suppose I have an action called a.A with some methods for updating
records and other for querying or just redirecting.

If I set up the validation file, it works for update but also for the
querying and redirection methods, which is not what I want.

My question is: is there a way to configure the validation for an
action to work just for some methods and not for others?

Thanks,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] question on validation

Posted by Daniel Amadei <da...@gmail.com>.
Hi Dave,

It did not work for the method but worked for the action alias this way:

A-alias-validation.xml

Thanks a lot for your help again.
Daniel

2007/2/10, Dave Newton <ne...@yahoo.com>:
> --- Daniel Amadei wrote:
> > My question is: is there a way to configure the
> > validation for an action to work just for some
> > methods and not for others?
>
> This is off the top of my head; typical grain-of-salt
> warnings apply.
>
> In addition to tweaking the list of methods that are
> skipped for the validation interceptor (fine if you
> have consistent method names, otherwise... not so
> fine) I belive you can use the curiously-named "alias"
> feature:
>
> ActionName-methodName-validation.xml
>
> which defines the validation for a method of an
> Action.
>
> I think; it's Friday, it's late, and I don't have my
> dev box :/
>
> Dave
>
>
>
>
> ____________________________________________________________________________________
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] question on validation

Posted by Dave Newton <ne...@yahoo.com>.
--- Daniel Amadei wrote:
> My question is: is there a way to configure the
> validation for an action to work just for some 
> methods and not for others?

This is off the top of my head; typical grain-of-salt
warnings apply.

In addition to tweaking the list of methods that are
skipped for the validation interceptor (fine if you
have consistent method names, otherwise... not so
fine) I belive you can use the curiously-named "alias"
feature:

ActionName-methodName-validation.xml

which defines the validation for a method of an
Action.

I think; it's Friday, it's late, and I don't have my
dev box :/

Dave



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org