Slight correction to above (copy and past problems when trying to make it generic):
<c:forEach items="${yourForm.listOf_A_Beans}" var="beanA" varStatus="beanAlistStatus"> <html:text property="listOf_A_Beans[${beanAlistStatus.index}].someProperty" value="${beanA.someProperty}" /><br> <c:forEach items="${beanA.listOf_B_Beans}" var="beanB" varStatus="beanBlistStatus"> <html:text property="listOf_A_Beans[${beanAlistStatus.index }].listOf_B_Beans[${beanBlistStatus.index}].someProperty" value="${ beanB.someProperty}" /><br> </c:forEach> </c:forEach> <nested:iterate property="listOf_A_Beans"> <nested:text property="someProperty" /><br> <nested:iterate property="listOf_B_Beans"> <nested:text property="someProperty" /><br> </nested:iterate> </nested:iterate> On 12/19/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > > On 12/19/05, fea jabi <[EMAIL PROTECTED]> wrote: > > > > > > > > Also, when exactly do we have to use the nested tags? > > > > You don't have to use them, but they make things easier/cleaner when you > need to display fields that are updatable that are nested. For example here > are two ways.. one with JSTL and one with nested (I think you'd agree the > second syntax is easier to read). > > <c:forEach items="${yourForm.listOf_A_Beans}" var="beanA" > varStatus="beanAlistStatus"> > <html:text > property="listOf_A_Beans[${beanAlistStatus.index}].someProperty" > value="${ beanA.someProperty}" /><br> > <c:forEach items="${beanA.listOf_B_Beans}" var="beanB" > varStatus="beanBlistStatus"> > <html:text property="listOf_A_Beans[${ beanAlistStatus.index > }].listOf_B_Beans[${beanBlistStatus.index}].name" value="${ > beanB.someProperty}" /><br> > </c:forEach> > </c:forEach> > > <nested:iterate property="listOf_A_Beans"> > <nested:text property="someProperty" /><br> > <nested:iterate property="listOf_B_Beans"> > <nested:text property="someProperty" /><br> > </nested:iterate> > </nested:iterate> > > -- Rick