You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sridhar Kotagiri <sk...@register.com> on 2003/08/07 15:14:52 UTC
HashMap population with jsp form!!!!Urgent..........
Hi,
I have a HashMap in my ActionForm bean.I am unable to populate with the form in the jsp page.
can anyone help me regarding this.
<logic:notEmpty name="editAdvancedForm" property="ip">
<b class="txtMedium" id="large"><bean:message bundle="content" key="title.ipaddresses"/></b>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<logic:iterate id="Element" name="editAdvancedForm" property="ip">
<tr class="textbox" style="width:150px;">
<td><html:text name="Element" property="ips(<%=Element.getkey()=%>"/></td>
<td><b><bean:message bundle="content" key="common.pointsto"/></b></td>
<td><html:text name="Element" property="ips(<%=Element.getvalue()%>)"/></td>
</tr>
</logic:iterate>
</table>
</logic:notEmpty>
Action Form
public class EditAdvancedForm extends ValidatorForm {
//~ Instance fields --------------------------------------------------------
private String domain_Id;
private Map ip;
public EditAdvancedForm(){
ip=new HashMap();
}
public void setIps(String key,String value) {
ip.put(key,value);
}
public Object getIps(String key)
{
return ip.get(key);
}
public Map getIp() {
return ip;
}
/**
* @param map
*/
public void setIp(Map map) {
ip = map;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org