You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Selim Hendrickson <se...@iyte.edu.tr> on 2004/03/05 11:36:58 UTC
Collection inside a collection
Hi,
I have a bean which holds an Arraylist containing objects. Each object
also holds another collection as a variable. What I would like to do is
iterate both of the collections. Can anybody suggest a resource that
shows an example or suggest a clue?
Selim
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Collection inside a collection
Posted by yoge <yo...@adventnet.com>.
Hope this helps.....
<logic:iterate name="/your bean name/" property="/propertyname/"
id="group" type="java.util.ArrayList">
<logic:iterate collection="<%= group%>" id="/column/"
type="java.lang.Object">
<%= row%>
</logic:iterate>
<br>
</logic:iterate>
--Yoge
Selim Hendrickson wrote:
> Hi,
>
> I have a bean which holds an Arraylist containing objects. Each object
> also holds another collection as a variable. What I would like to do
> is iterate both of the collections. Can anybody suggest a resource
> that shows an example or suggest a clue?
>
> Selim
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
RE: Collection inside a collection
Posted by Anirudh Jayanth <an...@sysarris.soft.net>.
Selim:
<logic:iterate collection="<%=bean.getArrayList()%>" id = "list"
>
//list would actually reference the objects within the
array list
<logic:iterate>
Anirudh Jayanth
SysArris Software
120A, Elephant Rock Road,
3rd Block, Jayanagar,
Bangalore - 560011
Tel: 6655165 / 052 [ ext - 244 ]
anirudh.j@sysarris.soft.net
-----Original Message-----
From: Selim Hendrickson [mailto:selimhendrickson@iyte.edu.tr]
Sent: Friday, March 05, 2004 4:07 PM
To: struts-user@jakarta.apache.org
Subject: Collection inside a collection
Hi,
I have a bean which holds an Arraylist containing objects. Each object
also holds another collection as a variable. What I would like to do is
iterate both of the collections. Can anybody suggest a resource that
shows an example or suggest a clue?
Selim
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org