struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zarar Siddiqi" <>
Subject Re: S2 : Validation per Action method - ideas?
Date Fri, 10 Aug 2007 01:46:15 GMT
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>

With this setup the validation in
MyActionClass-myAction-validation.xml is mapped to myMethod().


On 8/9/07, j alex <> wrote:
> Hi,
> Is there a way to declaratively restrict validations depending on the method
> within the Action? - this could be useful for wizard-like forms where each
> step of the wizard has a set of fields ; corresponds to a different method
> but all of them share the same Action.
> I can think of having an expression validator based on currentstep added to
> every field short-circuited ; but that's more of a workaround rather than
> the right way to do it.
> Thanks,
> Joseph

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message