Joe Germuska wrote:

At 7:47 PM -0400 6/21/04, Joe Hertz wrote:

Would making a Struts Action your "input" parameter solve this?


This is not a great solution, for all the reasons that action chaining is considered dangerous. After the validation fails, Struts would begin an entire re-execution of the RequestProcessor chain, and the archives have plenty of discussion on why that's unpredictable and worth avoiding.

One solution you could consider would be to set "validate='false'" in struts-config, and then execute logic in your action to test for staleness first, and, then, if necessary, reproducing the validation which happens in RequestProcessor.processValidate(...) It's basically this:

ActionErrors err = form.validate();
if (err.size() > 0)
{
  saveErrors(...);
  return mapping.getInputForward();
}

It seems to me that you could probably also organize your mapping configurations differently, but it's hard for me to make a suggestion without a better handle on what's actually going on. Anyway, this is a pretty simple and straightforward solution.

Joe


Thanks Joe, I think This is what I may do, The strategy I may take is to implement my own preExec()/validate()/postExec() methods that get exec'd within execute.

-Mark


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

Reply via email to