It's not a secret anymore!*
The moose likes Struts and the fly likes logic:iterate tag in double Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:iterate tag in double" Watch "logic:iterate tag in double" New topic

logic:iterate tag in double

fab etore

Joined: Jul 01, 2002
Posts: 9
i have a collection that have another collection. exemple : a collection of name, where each name, have a collection of number.
And i wanna display the two collection with the tag <logic:iterate>
EXEMPLE: <logic:iterate id="people" type="com.application.people" name="peoplelist">
<logic:iterate id="numberpeople" type="com.application.number" name="numberpeoplelist">
<!-- display the differents elements -->
thanks a lot.
Marek Lapin

Joined: Sep 19, 2004
Posts: 15
well, teoreticly it should work this way....

<logic:iterate id="people" name="peoplelist">
<logic:iterate id="numberpeople" name="people" property="numberpeoplelist">
<bean:write name="numberpeople"><br/>

but i came across a problem that sometimes i get an exception that "could not find bean 'numberpeople' at any scope (well the names of beans are taken from this example, the exception is in my onw project with diferent classes)

i suspect that it does not create this temporary bean (that is used to store actual object on which the iteration is at the moment) if there is only one element in the collection..
well i propably make another topic for my problem
wood burning stoves
subject: logic:iterate tag in double
Similar Threads
STRUTS: Iterating over a collection of ActionErrors
Help for logic match
Database driven dynamic radion buttons
Help regarding logic:iterate tag
help on html:select for default value