You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chandra Sekharan Bhaskaran <ch...@wipro.com> on 2002/08/12 18:31:44 UTC

setter method not getting called

Hi ,
    I had used ArrayList and it contains objects of class User.
    I use iterate tag and get the data from the form bean but
    when i change the data of user (edit) and then submit the setter
method
    is not being called.
in jsp the iterate tag is used as follows
   <logic:iterate id="supportingInfoTag" name="supportingInfoForm"
property="supportingInfo" >
    <html:text name="supportingInfoTag" property="username" size="25"/>
   </logic:iterate>
 
public MyForm extends ActionForm
{
    ArrayList supportingInfo;
    public void setSupportingInfo(ArrayList supportingInfo)
     {
          System.out.println("in setter method ");
          this.supportingInfo=supportingInfo;
     } 
   
    public ArrayList getSupportingInfo() 
    {
      return this.supportingInfo;
    }
}
Any help would be appreciated
rgds
C.Bhaskaran
 

RE: setter method not getting called

Posted by "SATISH.T" <sa...@wipro.com>.
Use the nested tags , refer to the tutorial at
www.keyboardmonkey.com/struts/primer  
 
-----Original Message-----
From: Chandra Sekharan Bhaskaran
[mailto:chandrasekharan.bhaskaran@wipro.com] 
Sent: Monday, August 12, 2002 10:02 PM
To: struts-user@jakarta.apache.org
Subject: setter method not getting called 
 
Hi ,
    I had used ArrayList and it contains objects of class User.
    I use iterate tag and get the data from the form bean but
    when i change the data of user (edit) and then submit the setter
method
    is not being called.
in jsp the iterate tag is used as follows
   <logic:iterate id="supportingInfoTag" name="supportingInfoForm"
property="supportingInfo" >
    <html:text name="supportingInfoTag" property="username" size="25"/>
   </logic:iterate>
 
public MyForm extends ActionForm
{
    ArrayList supportingInfo;
    public void setSupportingInfo(ArrayList supportingInfo)
     {
          System.out.println("in setter method ");
          this.supportingInfo=supportingInfo;
     } 
   
    public ArrayList getSupportingInfo() 
    {
      return this.supportingInfo;
    }
}
Any help would be appreciated
rgds
C.Bhaskaran