I don't use the those annotations, but from what I can tell, it only affects
the XML validation (validation interceptor) not the programmatic validation
(workflow interceptor). You can switch from execute to one of the
unvalidated method names (I think input, cancel, and two others I can't
think of at the moment). Or you can add your own methods to the list in the
workflow interceptor.
(*Chris*)
On Apr 29, 2011 12:08 PM, "Alex Barnes" <a...@barnes-home.com> wrote:
> Hi all,
>
> I am having a few issues with some code which worked a few days ago but
has stopped working for some reason. I have no idea what has changed to
cause this but here are the symptoms.
>
> I have an action class called NewSupplierAction which extends
ActionSupport and overrides the validate method and execute() methods and
also provides a public save() method. The execute method just creates a new
Supplier object and returns SUCCESS. This forwards the user to the
NewSupplier.jsp page. The execute method is annotated with @SkipValidation
because I only want to do the validation when I call the save() method.
>
> For some reason the validate method is being called when the execute()
method is invoked. This is happening because the code in the
AnnotationValidationInterceptor#doIntercept method doesn't find any
annotated methods on the action class and therefore doesn't find the
@SkipValidation annotation. I am using the StrutsSpringObject factory and
have defined the action in the Spring applicationConfig.xml file and then
refer to the action in struts.xml via the Spring bean id.
>
> Can you anyone think of any reason why the DefaultActionProxy doesn't have
the expected annotations?
>
> Thanks,
>
> Alex