They're only one action (/action1.do and /action2.do are forwards) I don't know how to use validator this way.
You will need something like this : - define 3 "form" in validator.xml - use this 3 names for your action mappings as "name" - use "attribute" to set the real name of the actionForm. Perhaps someone has some info about this ? [ Validator : how to validate only some properties for an ActionMapping ? ] Nico. > Is there a way to use Validator to in your proposition? > Is there a way to only use one action? > > thx for your quick response Nicolas > > -----Original Message----- > From: Nicolas De Loof [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2003 10:39 AM > To: Struts Users Mailing List > Subject: Re: Multipage Validation - Show errors on page where first > action occurs > > > use 3 actionMapping and 1 formBean with custom validate() : > > submit -> /action1.do (validate form1 parameters) input="page1" > -> forward to > /action2.do (validate form2 parameters) input="page2" > -> forward to > /action3.do (validate form3 parameters) input="page3" > > /action1 and /action2 are forward mappings > > /action3 uses formBean for business. > > validate() uses mapping to know what property to validate. You can > extend ActionMapping to add a property "validate" that you will set in > struts-config to the comma-separated list of form properties to > validate : > > <action path="/action1" > className="myActionMapping" > input="/page1.jsp" > forward="/action2.do"> > <set-property property="validate" value="fistname, lastname, > birthdate"/> > </action> > > > Hope it will help you. > > Nico. > > > Hi everybody, > > > > I will sketch my problem: > > > > I have a multi page form, that consists of 3 pages. > > There are next - previous buttons to navigate between the pages, no > > validation occurrs when pressing next/previous. > > The user can press submit on each of the 3 pages. > > When the user presses submit, then validation occurs. > > I would like the error messages to show on the page where the first > error > > comes from. > > > > If I use the page property in the field element, only the pages up > to the > > current page are validated, > > so that's not an option, I want everyhting to be validated. > > When I don't use the page property the errors show up on the page > where I > > pressed submit. > > > > Is there a way to show the error messages on the first page where an > error > > occurrs? > > For ex. I press submit on page3, I get a ValidationError : a > required field > > not filled in on page1 > > Redirect to page1 and show the error messages. > > > > thx, > > > > Nicolas Pottrain > > > > > -------------------------------------------------------------------- - > 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]