You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Titus Barik <ti...@barik.net> on 2005/05/23 23:49:27 UTC
logic:iterate multiple collections
Hi all,
Let's say I have two collections, A, and B. Is there a way to iterate
over multiple collections with something like logic:iterate?
i.e
<logic:iterate>
${rowA.name}
${rowB.value}
</logic:iterate>
--
Titus Barik (titus@barik.net)
http://www.barik.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: logic:iterate multiple collections
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Titus Barik" <ti...@barik.net>
>
> Let's say I have two collections, A, and B. Is there a way to iterate
> over multiple collections with something like logic:iterate?
>
If you know they're the same size and in the same order, (should be the case
with List,) how about iterating over one with <c:forEach varStatus="status">
and using ${status.count} to address the second List.
Can you change the design? If the items in both collections really belong
together, try to store them together so you don't have to jump through hoops
like this.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org