Phani wrote the following on 10/4/2004 10:00 PM:
I got a TreeMap structure in my FormBean. Each key in the TreeMap has got an ArrayList as its value.
Please let me know how to display the keys as well as the list of values for each key in the JSP page.
TreeMap map;
ArrayList items = (ArrayList)map.get(key);
The ArrayList "items" now contains a string of objects.
I need to display the key as well the items in the JSP page.
Not tested below but should be ok. the .?? is because I don't know what kind of Objects are in the List. If they are beans in the ArrayList just .whateverProperty where whateverProperty of course equates to a getter (getWhateverProperty() in the bean)
<c:forEach items="${yourFormBean.yourMap}" var="map"> The Key: <c:out value="${map.key}"/><br/> <c:forEach items="${map.value}" var="item"> Item in List: <c:out value="${item(.??)}/><br/> </c:forEach> </c:forEach>
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]