> -----Original Message-----
> From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 19, 2005 4:03 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator woes, modifying the input forward on the fly?
> 
> > Hi I have a situation like this:
> > User clicks on /viewUser.do?id=4 action, which loads the specific user
> > with
> > id4 to be viewed.
> > On that page is a form, the form is submitted, if some part of the xml
> > validation fails I need to return back to /viewUser.do?id=4.  It would
> be
> > ideal if the information from the form could be retained.  I can set my
> > input forward to be: input="/viewUser.do" but somehow I need to access
> > that
> > and add the parameter id=4 to it after the xml validation takes place,
> but
> > before the new page is requested.  Is there any possible way to do this?
> 
> 
> Use ActionRedirect class in your STRUTS Action's execute:
> 
> ActionRedirect ar = new
> ActionRedirect(mapping.findForward("myRedirectForward");
> ar.addParameter("id",yourId);
> return ar;
> 
> and it should work :]

Right, I understand this can work, the problem is WHERE do I return an
ActionForward or at least get access to the ActionForward that is going to
be used when the XML Validation fails.  The validate method on the form
returns an ActionErrors object, not an ActionForward...

Any other ideas?
Thanks,
David


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

Reply via email to