Thanks for the reply. I'm going to try it. As a matter of fact, I do have IDs that I'm 
using for the segments and objects contained within the segments. I want to use 
<html:link> tags within the loops to build links displaying various information about 
these objects.

Do you know if I can use Struts tags inside of the JSTL tags? If the JSTL tags just 
put beans in some scope, will the Struts tags know any difference?


On Thu, 26 Sep 2002 15:20:45 -0500
Eddie Bush <[EMAIL PROTECTED]> wrote:

> <c:set var="routes" value="${pageScope['routesKey']}"/>
> - or -
> <c:set var="routes" value="${requestScope['routesKey']}"/>
> - or -
> <c:set var="routes" value="${sessionScope['routesKey']}"/>
> - or -
> <c:set var="routes" value="${applicationScope['routesKey']}"/>

Do I need the above if I put the java.util.List on the request object in my Struts 
Action class prior to forwarding to the JSP?

> 
> <c:forEach values="${routes}" var="route">
>     <!-- Iterate over routes -->
>     Route ID: <c:out value="${route.id}"/><br>
>     <c:forEach values="${route.segments}" var="segment">
>         <!-- Iterate over segments -->
>         Segment ID: <c:out value="${route.id}"/><br>
>     </c:forEach>
> </c:forEach>
> 
> (I don't know if your routes/segments have an id property - it's just an 
> example)
> 
> I'm reasonably certain this should work.  I use basically the same 
> construct to go over an ArrayList (exposed as a Collection) and it's 
> nested ArrayList (again, exposed as a Collection).
> 
> Michael Bowman wrote:
> 
> >I am trying to nest iterate tags. I've tried <logic:iterate> <nested:iterate> and 
><c:forEach> without success. Here's what I want to do.
> >
> ><logic:iterate name="routes" id="route" type="RouteBean">
> >   write stuff about the route.
> >   <logic:iterate name="route" property="segments" id="segment" type="SegmentBean">
> >      write stuff about the segment
> >   </logic:iterate>
> ></logic:iterate>
> >
> >"routes" points to a java.util.List of RouteBeans. Each RouteBean has a method, 
>getSegments() that returns a java.util.List of SegmentBeans.
> >
> >I've looked at the documents and examples for the nested tag, but I don't see 
>anything about this type of nesting. I don't have a "monkey" with a single "bunch" of 
>bananas, instead I simply have a java.util.List of bunches, each of which has a 
>java.util.List of bananas.
> >
> >I'd really appreciate any help ya'll can give me. I'm up for using any tag type 
>(struts-logic, struts-nested, or JSTL). I'd just rather not fall back on scriptlets 
>if I can help it.
> >
> >Thanks,
> >Michael Bowman
> >
> 
> -- 
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to