I don't think you need the method name in validation file's filename. I would
try renaming the file to Item_update-validation.xml.
If your intention is to only validate when the method 'update' is being
called, you might have to use the Validation annotations rather than the XML
file. Remember though that there are a certain set of results ignored by the
validation interceptor by default (such as the "input" result).
-Wes
On Wednesday 08 April 2009 09:15:11 Roberto Nunnari wrote:
> Humm.. I don't know.. I tried with
>
> view:
> <s:form method="post" action="Item_update" namespace="/admin">
>
> struts.xml:
> <action name="Item_update" method="update"
> class="ch.nunnisoft.myecommerce.actions.admin.ItemAction">
> <result type="redirect-action">
> <param name="actionName">Item-view?id=${id}</param>
> </result>
> <result name="input" type="tiles">adminItemEdit</result>
> </action>
>
> and renamed validator xml file to:
> Item_update-update-validation.xml
>
> but still.. it doesn't check anything..
>
> Any more hints?
>
> Robi
>
> Lukasz Lenart ha scritto:
> > 2009/4/8 Roberto Nunnari <[email protected]>:
> >> <action name="Item-update" method="update"
> >
> > Action name is:
> > Item-update
> >
> > method name is:
> > update
> >
> > so then, validation file should be?
> > Item-update-update-validation.xml
> >
> >> and here's my Item-update-validation.xml file that I put in the same
> >> folder
> >
> > In theory this should work for whole action Item-update, but I think
> > the problem is that double dash ;-)
> >
> > Change naming convention for your actions, use namespace instead names
> > like Item-update or use underscore
> >
> >
> > Regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
--
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]