The reason this is not working for you is that "Element" bean name is
not around there when the request is populated back to your form. It is
there only when the JSP is populated from the action inside the
iteration.

To do what you want to do:

        <html-el:text property="ips(${Element.key})" />

using the html-el taglib of Struts-EL.

Haven't tested it but I think it should work.

HTH,
Erez



-----Original Message-----
From: Sridhar Kotagiri [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 6:16 PM
To: Struts Users Mailing List
Subject: Struts Problem!!!!Urgent

Hi,
   I have a HashMap in my ActionForm bean.I am able to display the
data.Butwhen I submit this form
   I am unable to carry the data.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="key"/></td>
                                <td><b><bean:message bundle="content"
key="common.pointsto"/></b></td>
                                <td><html:text name="Element"
property="value"/></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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

Reply via email to