Thanks for all the tips Niall. Its working to the point that is possible using Struts. Unfortunately, that does not solve my problem. And I cannot use your extension as we have this thing about registered jars here at work.
I guess a custom validator it is then. Harsh. -----Original Message----- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Friday, February 09, 2007 9:46 AM To: Struts Users Mailing List Subject: Re: Validating list backed struts form On 2/9/07, Chaudhary, Harsh <[EMAIL PROTECTED]> wrote: > Thanks for the tip. I will try this out now. Another question though, is > it also possible to attach error messages for each property depending > on which property it is. An example would be: > > <form name="Customer"> > > <field property="city" indexedListProperty="addressList" > depends="required"> > <arg0 key="orderform.quantity.label[somethingHere]"/> > </field> > > </form> > > Basically I want to have the error messages say, City 1 is required or > City is required etc. Theres nothing in Struts to do this - but I have an extension that can, availbale here: http://www.niallp.pwp.blueyonder.co.uk/strutsvalidatorextends.html#index ed Niall > I hope I was clear enough in my example. > > Harsh. > > -----Original Message----- > From: Niall Pemberton [mailto:[EMAIL PROTECTED] > Sent: Friday, February 09, 2007 4:35 AM > To: Struts Users Mailing List > Subject: Re: Validating list backed struts form > > > Specify the property in your form which returns the list of addresses > using the "indexedListProperty" element in your validation.xml - > "property" is then the property of a bean in that list. Something > like: > > <form name="Customer"> > > <field property="city" indexedListProperty="addressList" > depends="required"> > ... > </field> > > <field property="state" indexedListProperty="addressList" > depends="required"> > ... > </field> > > </form> > > Niall > > On 2/8/07, Chaudhary, Harsh <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am trying to validate a form which has an arraylist of Address > > objects. I would like some pointers on this or any references etc. > > > > Harsh. > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]