Kevin Wade wrote:
Greetings. I've seen a number of posts about this issue -- or related issues -- but no comprehensive solution. I'll try again and be succinct:

I have an action (Action1) that prepares a search screen (i.e. populates a drop-down box). The search screen/form calls Action2 but has a Action2-validation.xml file which specifies validation rules. In my struts.xml file, the result type of "input" for Action2 will redirect back to Action1 so that the search form is properly prepared and displayed.

This isn't working as I would expect. The validation seems to work fine but when the redirect to Action1 occurs on the result type of "input"... Action1 is not running because it ALSO is trying to find a result type of "input."

So... any ideas? I'm not sure why the "input" return type is propagating from Action2 to Action1, but I gather that the presence of the validation errors is triggering something in the DefaultWorkflowInterceptor in Action1 when the re-direct back to it occurs.

Any ideas how to make that not happen? How can I make validation not run on Action1? Or, alternatively, make the Interceptor ignore the validation errors after the redirect? I tried adding a @SkipValidation annotation to the execute() method of Action1, but that did nothing. Any ideas?

Kevin

Unless you've configured something to preserve them, the validation errors should be getting lost on the redirect (which is, of course, not what you want in this scenario but is the default behavior). What interceptor stack are you using? How are you preserving user input across the redirect?

I would suggest creating a minimal sample application demonstrating the problem, then posting the relevant bits of code and configuration for people to play with to diagnose what's happening.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to