| Author |
List of Lists <html:select>
|
andrew low
Greenhorn
Joined: Mar 22, 2005
Posts: 18
|
|
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 ]
|
 |
 |
|
|
subject: List of Lists <html:select>
|
|
|