title: Values not getting binded from jsp to action class in Struts 2
body: <p>I am working on Struts2 web application and currently i am facing issue with the form binding. The binding from jsp to the action class is not working. </p>
  
  <p>The scenario is i am having a list which is being set from the previous action. In current jsp I am iterating over the list and printing the values in the Table in jsp. Due to a requirement i am supposed to make the fields editable so that user can edit the values displayed and submit the updated values to the next action.</p>
  
  <p>The problem is that the values that i edit from the jsp are not being bound to the list in action class. I have tried multiple ways but no luck till now. below are the ways that i have tried.</p>
  
  <p>The First way i tried values are not getting bound:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;s:iterator value="list1" var="sVO" status="rowStatus"&gt;
      &lt;tr onclick="SelIndex('&lt;s:property value="itm_id"/&gt;');"&gt;
          &lt;td&gt;&lt;s:property value="itm_id"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;s:date name="proc_d" format="MM/dd/YYYY"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:property value="pln_n_n"/&gt;&lt;/span&gt;&lt;input type="text" size = "8" value="&lt;s:property value="pln_n_n"/&gt;"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:date name="trd_d" format="MM/dd/YYYY"/&gt;&lt;/span&gt;&lt;input type="text" size = "8" class="dateFilter" value="&lt;s:date name="trd_d" format="MM/dd/YYYY"/&gt;"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;s:select theme="simple" name="list1[%{rowStatus.index}].vari_ty" id="tranType" list="liTTypes" headerKey="None" value="vari_ty" listKey="key1" listValue="value1" /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:property value="description"/&gt;&lt;/span&gt;&lt;input type="text" size = "8" value="&lt;s:property value="description"/&gt;"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;s:property value="getText('format.money',{quantity})"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:property value="getText('format.money',{price})"/&gt;&lt;/span&gt;&lt;input type="text" size = "10"  value="&lt;s:property value="getText('format.money',{price})"/&gt;"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/s:iterator
  </code></pre>
  
  <p>The second way i tried values not getting bound:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;s:iterator value="list1" var="sVO" status="rowStatus"&gt;
      &lt;tr onclick="SelIndex('&lt;s:property value="itm_id"/&gt;');"&gt;
          &lt;td&gt;&lt;s:property value="itm_id"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;s:date name="proc_d" format="MM/dd/YYYY"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:property value="pln_n_n"/&gt;&lt;/span&gt;
              &lt;input type="text" name="list1[%{#rowStatus.index}].pln_n_n" value="&lt;s:property value="pln_n_n"/&gt;"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:date name="trd_d" format="MM/dd/YYYY"/&gt;&lt;/span&gt;
              &lt;input type="text" size = "8" name="list1[%{#rowStatus.index}].trd_d" class="dateFilter" value="&lt;s:date name="trd_d" format="MM/dd/YYYY"/&gt;"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;s:select theme="simple" name="list1[%{rowStatus.index}].vari_ty" id="tranType" list="liTTypes" headerKey="None" value="vari_ty" listKey="key1" listValue="value1" /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:property value="description"/&gt;&lt;/span&gt;
              &lt;input type="text" name="list1[%{#rowStatus.index}].description" size = "8" value="&lt;s:property value="description"/&gt;"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;s:property value="getText('format.money',{quantity})"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;span style="display:none;"&gt;&lt;s:property value="getText('format.money',{price})"/&gt;&lt;/span&gt;
              &lt;input type="text" name="list1[%{#rowStatus.index}].price" size = "10"  value="&lt;s:property value="getText('format.money',{price})"/&gt;"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/s:iterator&gt;
  </code></pre>
  
  <p>Below is the action class that i have</p>
  
  <pre><code> public class testAction extends BaseAction 
      {
  
  private List&lt;ProcessVO&gt; list1 = null;
     // getters and setters for list1 
  
  
     public String ListPage() throws AppException
       {
          String strReturn = "SUCCESS";           
      // This the method from which the list1 is populated   }
  
     public String ListPageSave() throws AppException
      {
          String strReturn = "SUCCESS";
  
      // This the method where i need the updated values from list1
      // values are not getting bound when this method is called from the page which is having Iterator tag,
       }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>  BaseAction:
  
     public class BaseAction extends ActionSupport implements SessionAware, ServletRequestAware, ServletResponseAware, ServletContextAware {
  
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
  
  /**
   * HTTP Request object.
  </code></pre>
  
  <p>}
  The <code>ProcessVO</code> contains the attributes and getters and setters for each attribute.</p>
  
  <p>Can anyone please let me know what is the issue here. I am using the same list1 object which needs to be updated. Any help will be very useful for me as i am stuck with this issue.</p>