If you define action alias for specific methods in your struts.xml (you
can do so with wildcards too), then you can use this format
<actionClass>-<actionAlias>-validation.xml as stated below.
http://struts.apache.org/2.1.8.1/docs/validation.html
Defining Validation Rules
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
In this context, "Action Alias" refers to the action name as given in
the Struts configuration. Often, the name attribute matches the method
name, but they may also differ.
Em 29-04-2010 14:01, David Harland escreveu:
Hi,
Is there any way of creating a struts validation xml for a specific method or
is the only way of doing through an Action method eg.
public String saveSomething() {
return SUCCESS;
}
public void validateSaveSomething() {
//
}
Thanks
Dave.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org