Re: Extending RequestProcessor to handle validation errors

2005-02-03 Thread Frank W. Zammetti
Hi Kishore, I've actually decided to not use this trick anyway, based on a point raised by Niall. I'll actually be cloning the ActionMapping and changing the input in that clone. I hope to actually implement this today, but I have a huge conference call most of the day, so we'll see. This

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Benedict, Paul C
Frank, I am not sure of why you need this solution. I never came across your need -- and perhaps because I never encountered the problem. I can't imagine why you would want to dynamically control the input page. For instance, I use MappingDispatchAction and each action entry has its own

Re: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Joe Germuska
With the ComposableRequestProcessor, the validation is independent from the command which puts an ActionForward into the context in the event of a failed form validation. It should be very straightforward for you to change the SelectInput command or add another one which uses request context

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
Are you familiar with my project Paul? If not, I'll briefly explain (otherwise, just skip to the third paragraph)... It is a project that allows Actions to be exposed as Web Services with no changes to the existing code. All a developer has to do is add a plug-in, and optionally a new

Re: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
You are referring to the CoR-based Struts build, correct Joe? If not, I'm not seeing that class in the 1.1 javadocs. If your talking CoR as I think you are though, I haven't gotten that far yet :) I'm trying to get this to a point of equillibrium that I'm happy with based on the current

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
now makes perfect sense. Also, Joe's explanation is the right answer. Thanks, Paul -Original Message- From: Frank W. Zammetti (MLists) [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 1:04 PM To: Benedict, Paul C Subject: RE: Extending RequestProcessor to handle

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Joe Germuska
This actually stimulated another thought. Perhaps instead of overriding process validate, you could arrange to have your ActionMappings dynamically instantiated with the correct value for input (assuming that you can know it before you do the validation.) There is nothing sacred about the

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
On Wed, February 2, 2005 1:10 pm, Joe Germuska said: This actually stimulated another thought. Perhaps instead of overriding process validate, you could arrange to have your ActionMappings dynamically instantiated with the correct value for input (assuming that you can know it before you do

Re: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Niall Pemberton
: Wednesday, February 02, 2005 6:28 PM Subject: RE: Extending RequestProcessor to handle validation errors On Wed, February 2, 2005 1:10 pm, Joe Germuska said: This actually stimulated another thought. Perhaps instead of overriding process validate, you could arrange to have your ActionMappings

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Joe Germuska
At 10:28 AM -0800 2/2/05, [EMAIL PROTECTED] wrote: On Wed, February 2, 2005 1:10 pm, Joe Germuska said: This actually stimulated another thought. Perhaps instead of overriding process validate, you could arrange to have your ActionMappings dynamically instantiated with the correct value for

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
On Wed, February 2, 2005 1:28 pm, [EMAIL PROTECTED] said: Actually, now you've stimulated a though in me! :) Correct me if I'm wrong, but processPreprocess() fires BEFORE processValidate(), correct? In that case, since I can in fact determine the input after processPreprocess() fires, I can

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
GOT IT! But, this might be the worst piece of hackery I've ever done. Check it out... Joe's last response spurred me to realize that if I could override the input field of the ActionMapping, I could do what I want. As I thought, processPreprocess() fires before processValidate(), which means

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread dbrosius
i might put that freeze in a finally block, if you're gonna do something nasty, better make sure you leave no footprints. :) if (request is a web service) { try { ACUnfreezer.unfreeze(mapping); mapping.setInput(the new JSP to go to in case of validation errors); } finally {

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
Excellent point! It's done. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, February 2, 2005 2:23 pm, [EMAIL PROTECTED] said: i might put that freeze in a finally block, if you're gonna do something nasty, better make sure you

Re: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
RequestProcessor to handle validation errors On Wed, February 2, 2005 1:10 pm, Joe Germuska said: This actually stimulated another thought. Perhaps instead of overriding process validate, you could arrange to have your ActionMappings dynamically instantiated with the correct value for input

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Joe Germuska
I would recommend against unfreezing the ActionMappings; they are shared throughout the application, and you have no way of knowing whether some non-webservice request may come along in a minute and get the same ActionMapping instance and get stuck with an incorrect value for the input

RE: Extending RequestProcessor to handle validation errors

2005-02-02 Thread fzlists
That makes sense, cloning as Niall does sound right (shucks, had it working and done!). Simple question: how should the mapping be cloned? I mean, clearly when I override processMapping() I'll just call the super version and then clone what I recieve and return that, but how should I

Re: Extending RequestProcessor to handle validation errors

2005-02-02 Thread Niall Pemberton
just create my own custom ActionMapping and have a constructor which takes an ActionConfig and clones all its properties. Niall - Original Message - From: [EMAIL PROTECTED] To: dev@struts.apache.org Sent: Wednesday, February 02, 2005 7:57 PM Subject: RE: Extending RequestProcessor