Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using Map for logic:iterate

Status
Not open for further replies.

caesarkim

Programmer
Oct 30, 2003
56
US
I am trying to use Map for logic:iterate, but i can't figure it out. can someone help me out?

<form-bean name="messageOptionsForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="address" type="java.util.Map" />
</form-bean>

Map value = new HashMap();
value.put("city1", "Boston");
dynaForm.set("address", value);

value.put("city2", "New York City");
dynaForm.set("address", value);


request.setAttribute("addresses", value);


<logic:iterate id="address" name="addresses" indexId="idx">
<tr>
<td><html:radio name="address" property="value" value="address(key)"/>: <bean:write name="address" property="value"/></td>
</tr>
</logic:iterate>


Thanks..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top