Thanks Laurie, that was what I needed to do.

Turns out that my action was setting an action error before doing its chaining and so when validation was triggered on the chained action it was thinking an error had occurred and forcing the "input" result.

So, now all I really need to know is if there is a way that I can just flat out disable all of struts2's validation stuff but still have my actions extend ActionSupport? Is there something I can put in my struts.xml file to prevent validation from running against my actions?

I would also technically consider this a bug because IMO I should be allowed to set action errors and chain to other actions without having validation break my chaining. My guess is that the validation code is using the hasActionErrors() method to determine if the 'input' result should be sent after validation, but that seems suboptimal. It would be better if the validation actually tracked if it had actually failed any of its validation checks and only modify the result then, not just because there is an action error.

-- Allen


Laurie Harper wrote:
As well as validation errors, there could still be conversion errors. You said you don't have any conversions configured but remember that Struts will apply default converters if you have any setters on the action that take non-String arguments (assuming the request includes an attribute that matches that setter).

I would suggest setting up an 'input' result pointing to a simple JSP page with s:actionerror, s:actionmessage and s:debug tags on it. Maybe you'll find a clue as to what's wrong there.

L.

Allen Gilliland wrote:


Dave Newton wrote:
--- Allen Gilliland <[EMAIL PROTECTED]> wrote:
I can't see any reason why validation would be doing
anything at all unless somehow the validation interceptor wants to use one of the methods in my action class for validation when i didn't intend that.

So you have no *-validation.xml files? No methods
named validate*?

nope, no *-validation.xml files and no validate* methods. i do have a myValidate() method in some actions which i started using after realizing that i couldn't use validate().

-- Allen



Hrm.

d

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


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

Reply via email to