Thanks for gettig back to me so quickly.
I am actually setting the hidden page property. I'm using a StrutsTest so
the jsp doesn't actually exist at the moment but I'm creating a form, and
setting the fields, and then using
form.setPage(2);
to set the this property. So I'm effectively submitting a form with the
hidden page property set to 2.
any ideas what else could be stopping it?
----- Original Message -----
From: "Brandon Mercer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[email protected]>
Sent: Tuesday, March 22, 2005 4:04 PM
Subject: Re: multi-page validation form
> Jack Perrett wrote:
>
> >I'm trying to create a form that will be validated over a series of
jsp's. I'm using the page property with individual fields to specify whether
they should be validated on a particular page and then setting the hidden
page property to whatever the corurrent jsp page.
> >
> >This is how my field looks in the validation.xml
> >
> ><field property="adults"
> > page="2"
> > depends="required">
> >
> > <arg0 key="passengerBookingForm.adults"/>
> ></field>
> >
> >But it just seems to ignore this validation whatever I set the form page
property to. I'm expecting it to perform this validation if the form page
property is >= 2, and ignore the validation altogether if the form page
property is < 2.
> >
> >I have noticed that changing the page value to an integer (without the
quotes) eg
> >
> ><field property="adults"
> > page=2
> > depends="required">
> >
> > <arg0 key="passengerBookingForm.adults"/>
> ></field>
> >
> >it does the validation, but it will do it no matter what I set the page
form property to. Has anybody got this working or know what I'm doing wrong?
> >I appreciate any help, thank you,
> >
> >
> Yup, it's quite easy. Just set a hidden value in the page.
> <input type="hidden" property="page" value="1"/>
>
> Then in your validation.xml for your form do this:
> <form name="yourform">
> <field property="fieldname"
> depends="required"
> page="1">
> </field>
> </form>
>
> Hope this helps.
> Brandon
>
> ---------------------------------------------------------------------
> 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]