You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by AlfonsoQuiroga <al...@hotmail.com> on 2007/10/30 19:54:11 UTC

I have the solution!

Hi, I was with the same problem (validation for only 1 method), here is the
solution:

I have this:
        <action name="pruebaValid_*" method="{1}" class="actions.MyAction">
        	<result name="input">/pages/input.jsp</result>
        	<result>/pages/inputOk.jsp</result>
        </action>

So, if I want a validation for the method "save", I need to put (in actions
package) a file called:

"MyAction-pruebaValid_login-validation.xml"

It has no sense, because the correct name should be
"MyAction_login-validation.xml" but ok, I hope this is for your help !!
-- 
View this message in context: http://www.nabble.com/struts2-validation-for-only-one-method-in-action-tf3267302.html#a13493202
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: I have the solution!

Posted by AlfonsoQuiroga <al...@hotmail.com>.
I made a mistake, the correct xml name is
"MyAction-pruebaValid_save-validation.xml" instead of
"MyAction-pruebaValid_login-validation.xml" ;-)


AlfonsoQuiroga wrote:
> 
> Hi, I was with the same problem (validation for only 1 method), here is
> the solution:
> 
> I have this:
>         <action name="pruebaValid_*" method="{1}"
> class="actions.MyAction">
>         	<result name="input">/pages/input.jsp</result>
>         	<result>/pages/inputOk.jsp</result>
>         </action>
> 
> So, if I want a validation for the method "save", I need to put (in
> actions package) a file called:
> 
> "MyAction-pruebaValid_login-validation.xml"
> 
> It has no sense, because the correct name should be
> "MyAction_login-validation.xml" but ok, I hope this is for your help !!
> 

-- 
View this message in context: http://www.nabble.com/struts2-validation-for-only-one-method-in-action-tf3267302.html#a13494658
Sent from the Struts - User mailing list archive at Nabble.com.


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