Or you could use the 'parameter' attribute on the action mapping, and use two different mappings. That has the advantage of not relying on a parameter sent from the client to distinguish between search and edit.
-- Martin Cooper > -----Original Message----- > From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 12, 2002 5:48 AM > To: 'Struts Users Mailing List' > Subject: RE: change an Actionform > > > Hi Sven, > > I guess the easiest way would be to add an action property to > your form then > add a <html:hidden property="action" value="search/edit"/> to > your jsps. > Then in your validate method check the value of the action > property and > validate accordingly. > > Jon Ridgway > > > -----Original Message----- > From: Efftinge, Sven [mailto:[EMAIL PROTECTED]] > Sent: 12 July 2002 12:43 > To: 'Struts Users Mailing List' > Subject: AW: change an Actionform > > Hi Jon, > I did it that way, too and it worked. > But I wanted to validate the search form and I just have one > validate method > per ActionForm, and the validation in search and edit is not the same. > > I'm wondering about this problem because it's so fundamental. > I mean doesn't need anybody who works with struts a solution for this? > > > -----Urspr�ngliche Nachricht----- > Von: Jon.Ridgway [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 12. Juli 2002 12:40 > An: 'Struts Users Mailing List' > Betreff: RE: change an Actionform > > > Hi Sven, > > I do it as specified in my previous post. Although I'd use > the same action > form to store search and editing values, this way the > mapping.getName () bit > in the search action would work (no hard coding of the key to > use to store > the search results in session/request for editing). > > Jon Ridgway > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > The contents of this email are intended only for the named > addressees and > may contain confidential and/or privileged material. If > received in error > please contact UPCO on +44 (0) 113 201 0600 and then delete the entire > e-mail from your system. Unauthorised review, distribution, > disclosure or > other use of this information could constitute a breach of > confidence. Your > co-operation in this matter is greatly appreciated. > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

