Maybe try:
> <c:forEach items="${applicationForm.schools}" var="school"> > <tr> > <td> > <html:text indexed="true" name="school" property="name"/> > </td> > </tr> <c:set var="courses" value="${school.courses}"/> > <c:forEach items="${courses}" var="course"> > <tr> > <td> > <html:text indexed="true" name="course" > property="courseTitle"/> > </td> > </tr> > </c:forEach> > </c:forEach> > <<An Obstacle is something you see when you take your eyes off the goal>> -----Original Message----- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 1:08 PM To: Struts Users Mailing List Subject: RE: nesting c:forEach loops I believe you'll be forced to "manufacture" the resulting parameter name, and probably the value (if you intend the field to show the existing values). This probably means you'll have to use a stock "input" element instead of html:text. > -----Original Message----- > From: Jarnot Voytek Contr AU/SC [mailto:[EMAIL PROTECTED] > > Is it possible to nest forEach loops and have the html:text > input fields work correctly? > > My JSP code: > <c:forEach items="${applicationForm.schools}" var="school"> > <tr> > <td> > <html:text indexed="true" name="school" property="name"/> > </td> > </tr> > <c:forEach items="${school.courses}" var="course"> > <tr> > <td> > <html:text indexed="true" name="course" > property="courseTitle"/> > </td> > </tr> > </c:forEach> > </c:forEach> > > Within the second loop, input field names are rendered as > course[0].courseTitle rather than the required > school[0].course[0].courseTitle. Any ideas on nesting these > loops? I'd rather stick with JSTL and html-el rather than > the nested taglib. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ----------------------------------------- This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]