This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes using Map for logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "using Map for logic:iterate" Watch "using Map for logic:iterate" New topic
Author

using Map for logic:iterate

John Smith
Greenhorn

Joined: Oct 07, 2003
Posts: 15
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..
 
GeeCON Prague 2014
 
subject: using Map for logic:iterate