You can try specifying rules for every monthbean "monthBean[0].dayBeans,
monthBean[1].dayBeans...." as your indexed list property. 


....or you can extend the validate method and call the validations on each
MonthBean yourself

                ActionErrors errors = super.validate(.....
                for each month bean .....
                        
                        Validator validator =
StrutsValidatorUtil.initValidator(
                                        mapping.getAttribute()+
".monthBean",
                                getMonthBean(indx), application, 
                                        request,monthBeanErrors, page);
                        validator.validate();
                        merge(errors, monthBeanErrors, "monthBean", indx);

provide your monthBean validation rules using mainFormName.monthBean as the
form name.



-----Original Message-----
From: Zeitlin, Mike [mailto:ZeitlinM@;daugherty.com]
Sent: Thursday, October 24, 2002 3:23 PM
To: [EMAIL PROTECTED]
Subject: Validator and multi-tiered nesting



Using an example,  let us say that I have a CalendarForm,  and this Form has
a Collection of MonthBeans,  and each MonthBean has a collection of
DayBeans.  How can I reference fields in the DayBean in the validation.xml?
It seems that using indexedListProperty will only allow me to go to the
collection of MonthBeans but no deeper.

Any help would be appreciated,
Mike Zeitlin
Daugherty Systems

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to