Do you really have a DeltaItem object with an attribute named "columnName?"
BTW: You don't need the indexId unless you want to specifically access an
element (e.g., if( diIndex == 2 ){...}).
-----Original Message-----
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:10 PM
I'm lost with this stuff. I can't seem to get it working. I'm getting the
following error:
[ServletException in:/tiles/cc/cat_history_content.jsp] No selector
attribute (cookie/header/name/parameter) was specified'
I set my collection in my action class in request attribute:
request.setAttribute("historyItems", historyList);
Then in my page I have:
<logic:iterate id="historyItem" name="historyItems"
type="com.gosps.cbd.util.HistoryItem" indexId="hiIndex">
<logic:iterate id="deltaItem" name="historyItem" property="deltaList"
type="com.gosps.cbd.util.DeltaItem" indexId="diIndex">
<bean:write name="deltaItem" property="columnName" />
</logic:iterate>
</logic:iterate>
Setting the types to java.util.List doesn't help either.
Any ideas.
-----Original Message-----
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 12:31 PM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection
If you have a collection like an ArrayList, every element has an index. At
each of these element addresses, you have another ArrayList. With Struts,
if you iterate through the parent collection based on the indexId (first
element = 0, last element = n-1), you can retrieve the contents of each
collection stored at the element index of the collection automatically:
<logic:iterate name="parentCollection"
property="parentProperty"
indexId="parentIndex" //arbitrary name
id="parent" //arbitrary name
type="java.util.List">
<logic:iterate name="parent"
property="childProperty"
indexId="childIndex" //arbitrary name
id="child" //arbitrary name
type="java.util.List">
<bean:write name="child" property="_whatever_" />
// etc.
</logic:iterate>
</logic:iterate>
Mark
-----Original Message-----
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 11:08 AM
Excuse my naivet�, how would I refer to collection within a collection?
Thanks
--
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]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>