You can turn off validation for a specific method by using the @SkipValidation annotation above your action method.
http://struts.apache.org/2.x/docs/validation.html 2008/1/21, Martin Braure de Calignon <[EMAIL PROTECTED]>: > > Hello :-), > > I have two questions, the first one is more important for me : > I have a validation xml files, but I want to validate only if user click > on 'OK' button, and not on 'Cancel'. How to do this ? Do I have to make > all my fields as expression or fieldexpression and test the value of the > submit button ? > > The second question is more complicated. When there's a validation > error, I want to display back the page but with errors. > I'm using wildcard action, and per-method (per-alias) validation. > What I've done for the moment, but I think it's not a clear method, is > to have an interceptor (BackViewInterceptor), that intercept the result > 'input', and change it to the previous result. > But this solution only works on simple cases. Is there's a better way of > handling such a behaviour ? > > > Thank you all, > -- > Martin Braure de Calignon > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >