• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

List of Lists <html:select>

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic