Thank you.  So MyAction-validation.xml will only work with the following 
(equivalent configs)?

<action name="MyActionSave"  class="MyAction">
  <interceptor-ref name="formStack"/>
  <result>/result.jsp</result>
</action> 

or 

<action name="MyActionSave"  class="MyAction" method="execute">
  <interceptor-ref name="formStack"/>
  <result>/result.jsp</result>
</action> 


----- Original Message ----
From: Musachy Barroso <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>; Jon Wilmoth <[EMAIL 
PROTECTED]>
Sent: Wednesday, May 30, 2007 9:56:43 AM
Subject: Re: [S2] How Validators of an Action are Found

for:

<action name="MyActionSave"  class="MyAction" method="save">
  <interceptor-ref name="formStack"/>
  <result>/result.jsp</result>
</action> 

it would be 

MyAction-save-validation.xml.

musachy


On 5/30/07, Jon Wilmoth <[EMAIL PROTECTED] > wrote:
http://struts.apache.org/2.x/docs/validation.html says:

Validation rules can be specified:
Per Action class: in a file named ActionName-validation.xml
Per Action alias: in a file named ActionName-alias-validation.xml
Inheritance hierarchy and interfaces implemented by Action class: XWork 
searches up the inheritance tree of the action to find default validations for 
parent classes of the Action and interfaces implemented 

Unfortunately the documentation  doesn't tie the alias back to a specific 
struts.xml configuration element.   Is the alias supposed to be the action's 
method name if it's not the default "execute"? 

For example does the action configuration below require 
MyActionSave-save-validation.xml?

<action name="MyActionSave" ... method="save">
   <interceptor-ref name="formStack"/> 
   <result>/result.jsp</result>
</action>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Reply via email to