Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

List of Lists <html:select>

 
andrew low
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am preparing a list of lists - that is to say a list of distinct categories that need to be displayed individually in separate selects, but should populate a single list of values. So in psudeo code I've got a data structure like this

List a = new List();
a.add(new List());
a.add(new List());
a.add(new List());
a.add(new List());
a.add(new List());

how do I get to these itesm to display them with an <html:select>. I am adding them to the session as 'codes'. I can get them back and eumerate through them normally (<% type stuff %> but can't seem to get them to display as codes[0] etc.


Cheers
Andrew


I think I solved this

<c:forEach items="${codes}" var="x">
<html:select name="cw" property="destinationCandidate.codes" multiple="true" size="10">
<c:forEach items="${x}" var="y">
<html ption key="${y.id}" value="${y.value}" />
</c:forEach>
</html:select>
</c:forEach>

Is this looking right - can I have multiple selects with the same name and property?

Many thanks

Andrew


[ May 24, 2005: Message edited by: andrew low ]
[ May 24, 2005: Message edited by: andrew low ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic