title: In Struts1.3 How Handling Multiple FormBean property to action
body: <p>I am using Struts1.3, I have Jsp page which is showing the list of employees on that page. For this what i did is, I have a action inside that action i am calling a function which returns List and i am setting these list inside the session as session.setAttribute(Constant.EMPLIST,list). And now in my Jsp page i am using logic tag to iterate this list as below given.</p>
  
  <pre><code>&lt;html:form method="post" action="test.do" styleId="empForm"&gt;
    &lt;logic:iterate id="EmpForm" name="&lt;%=Constant.EMPLIST%&gt;"&gt;
      &lt;table&gt;
       &lt;tr&gt;
        &lt;td&gt;
          &lt;html:text property="empName" name="EmpForm" styleClass="fieldbox2" styleId="textfield50"/&gt;
  
        &lt;/td&gt;
          &lt;td&gt;
  
          &lt;html:text property="empSal" name="EmpForm" styleClass="fieldbox3" styleId="textfield50"/&gt;
  
        &lt;/td&gt;
   &lt;/table&gt;
  &lt;/logic:iterate&gt;
   &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;img onclick="updateEmpDetails" src="images/update.jpg" /&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And it's showing all the employee details and working fine. But one more job is that on this page i have a <code>update</code> button. And what i need to do is after clicking on <code>updateEmpDetails</code>  button. I need to send all the employee updated details inside the updateAction but I am unable to do this, I don't know how to handle the multiple FormBean property value. I am able to fetch only one Employee details inside the updateAction. I am doing this inside my updateAction</p>
  
  <pre><code> EmpForm empForm = (EmpForm) form;
  System.out.println("EmpId:::" + empForm.getEmpId);
  </code></pre>
  
  <p>I don't know how to do this if possible  List Or how to handle multiple FormBean Value. please guide me how to do this,if any example please it really appreciate me. 
  Thanks</p>
  
  <p>Update::
  This is my plan java class with setter and getter property:</p>
  
  <pre><code>public class Sites {
      private String jobSite="";        
      private String engineerName="";
      private boolean isCheck;
  }
  </code></pre>
  
  <p>This is my FormBean:</p>
  
  <pre><code>public class SiteToServiceForm extends org.apache.struts.action.ActionForm {
  
  
     private List&lt;Sites&gt; sites=new ArrayList&lt;Sites&gt;();
  
      public List&lt;Sites&gt; getSites() {
          return sites;
      }
  
      public void setSites(List&lt;Sites&gt; sites) {
          this.sites = sites;
      }
  
  
  }
  </code></pre>
  
  <p>This is my action:</p>
  
  <pre><code>public class SiteToServicingAction extends org.apache.struts.action.Action {
   List&lt;Sites&gt; siteDetails=SiteSearchDataModel.getSiteDetails(serviceForm);
  
  
          ((SiteToServiceForm) form).setSites(siteDetails);
  }
  </code></pre>
  
  <p>For display purpose working fine now i need to submit the update sites value, I am doing this inside action:</p>
  
  <pre><code> List&lt;Sites&gt; siteList=serviceForm.getSites();
              if(siteList!=null &amp;&amp; siteList.size()&gt;0)
              {
                  for(Sites site:siteList)
                  {
                      if(site.isIsCheck()==true)
                      {
                          SiteSearchDataModel.updateRecord(serviceForm.getEngineerId(), site.getPropertyId());
                          System.out.println("properyID::::"+site.getPropertyId());
                      }
                  }
              }
  </code></pre>
  
  <p>And i am not able to get the update list into my action class please help me.</p>