You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Volker Karlmeier <vo...@magiccode.eu> on 2008/04/29 23:55:36 UTC

once again: validate() not called

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello struts freaks,

i have quite an interesting problem again. In my struts.xml i have 
defined a method to call for my action (method="save")

Every time execute() is called in my action class, the method validate() 
is executed before.
The same action class used with struts.xml-parameter method="save" is 
also executed as expected,
but validate is never called before the method save.

I think the intention of the interfaces Validatable/ValidationAware is 
that validate() should be called before the
action is executed. This should work using execute() as well as any 
other method configured in struts.xml with the
parameter method="<method to call>".


<interceptor-ref name="validation">
~  <param name="includeMethods">save</param>
</interceptor-ref>            

does not work.

Any suggestions ? Thanks in advance

~  Volker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFIF5lYaEMQXBIqssERAvT9AJ4iSJRWu8MLlRt7V0+AApriy7K9OQCgj2js
0Zmn6+7SzBDSZ2nzB/s5gww=
=GPw3
-----END PGP SIGNATURE-----


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


Re: once again: validate() not called

Posted by Laurie Harper <la...@holoweb.net>.
Volker Karlmeier wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello struts freaks,
> 
> i have quite an interesting problem again. In my struts.xml i have 
> defined a method to call for my action (method="save")
> 
> Every time execute() is called in my action class, the method validate() 
> is executed before.
> The same action class used with struts.xml-parameter method="save" is 
> also executed as expected,
> but validate is never called before the method save.
> 
> I think the intention of the interfaces Validatable/ValidationAware is 
> that validate() should be called before the
> action is executed. This should work using execute() as well as any 
> other method configured in struts.xml with the
> parameter method="<method to call>".

Perhaps you didn't see my previous reply requesting more information:

http://www.nabble.com/Re%3A-Validation-on-methods-p16886534.html

> <interceptor-ref name="validation">
> ~  <param name="includeMethods">save</param>
> </interceptor-ref>           
> does not work.

That's because it's the workflow interceptor, not the validation 
interceptor, which calls validate().

L.


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