FAQ
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

Search Discussions

  • Anirudh Jayanth at Mar 5, 2004 at 10:41 am
    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
    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
  • Yoge at Mar 5, 2004 at 10:56 am
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedMar 5, '04 at 10:37a
activeMar 5, '04 at 10:56a
posts3
users3
websitestruts.apache.org
irc#struts

People

Translate

site design / logo © 2022 Grokbase