Hi,

There is a struts form:
<form-bean dynamic="true" name="cart" type="org.apache.struts.action.DynaActionForm">
<form-property name="itemsMap" type="java.util.LinkedHashMap" />
</form-bean>


This hash map has got nested has maps. approximately next:

LinkedHashMap itemsMap = new LinkedHashMap();

HashMap map = new HashMap();
map.put("Item1", new Integer(2));
map.put("Item2", new Integer(4));
map.put("Item3", new Integer(10));

....

itemsMap.put(new Integer(0), map);

( (DynaActionForm) actionForm).set("itemsMap", itemsMap);

How can I show this structure using nested:iterate? How can I get inner hash map?
Next code on JSTL is working well:
<TABLE>
<c:forEach var="itemMain" items="${cart.map.itemsMap}">
<c:forEach var="item" items="${itemMain.value}">
<tr>
<td><c:out value="${item.key}"/></td>
<td><c:out value="${item.value}"/></td>
</tr>
</c:forEach>
</c:forEach>
</TABLE>



But if I try nested:iterate it doesn't work:


<TABLE>
<nested:iterate id="itMap" property="itemsMap">
<nested:iterate id="map" property="value">
<TR>
<TD><nested:text property="value"/></TD>
</TR>
</nested:iterate>
</nested:iterate>
</TABLE>


Thanks, Serhiy



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to