It is across entire app (there are many dozen of actions) - every single action has to have same behavior - 3 crosses go and try again. It's app for changing personal info on government issued documents - sorta wizard like thing. I can see how I can do it by keeping eye of parameters - but I am looking for cleanest possible implementation. But if I decide to modify default stack I am not certain what might be consequences for the rest of app.
________________________________ From: Dave Newton <newton.d...@yahoo.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Saturday, June 20, 2009 7:57:24 PM Subject: Re: Custom validation interceptor Peter Bliznak wrote: > I have following requirement: If validation of the page fails 3 times > in row - invalidate session and redirect to index page. Should I > replace default validation interceptor in default stack with my own > to achieve what I am after? I there any other way? Is this across the entire app or just a single action? If it's just a single action then this could probably be done via a session var or a hidden counter (updated in the actions validate() method)... although I'm not sure how you'd tell the workflow interceptor to go to the "strike three" page. AFAICT the workflow.inputResultName parameter doesn't eval OGNL, so you'd have to set the result location in the action--seems messy. I started off thinking no on the interceptor, but now I'm not so sure. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org