title: How to Pass List using Ajax call to Spring MVC Controller
body: <p>I have holding object as follows：</p>
  
  <pre><code>public class Transfer implements Serializable {
       private Integer transferId;
       private Integer transferTypeId;
       private String storeId;
       private String userId;
       private Integer titleId;
       private Integer statusId;
       private String inWorkerId;
       private String outWorkerId;
       private Date createDt;
       private Date updateDt;
       // getters &amp; setts
   }
  </code></pre>
  
  <p>And I have var <code>reqRow</code> that need to be sent to the controller</p>
  
  <pre><code>function onClickSave(){
      var rows = $('#transferEditGrid').jqGrid('getRowData');
      var reqRow = [];
      for (i = 0; i &lt; rows.length; i++)
      {
          var rowObj = {};
          rowObj.storeId = rows[i].storeId;
          rowObj.inWorkerId = rows[i].inWorkerId;
          rowObj.outWorkerId = rows[i].outWorkerId;
          rowObj.transferTypeId = rows[i].transferTypeId;
          rowObj.statusId = rows[i].statusId;
          rowObj.storeId = rows[i].storeId;
          reqRow.push(rowObj);
      }
  
      //send reqRow to the Controller
      $.ajax({
          type:'POST',
          url:'${contextPath}/resource-transfer/update.do',
          dataType:"json",
          data : {rows : reqRow},
          //data:JSON.stringify(reqRow),
          success:function(response){
              alert("success");
  
          }
      });
  }
  </code></pre>
  
  <p>The controller is following :</p>
  
  <pre><code>@RequestMapping(value = "/update", method = { RequestMethod.GET, RequestMethod.POST }, produces = "application/json; charset=utf-8")
  @ResponseBody
  public String transferUpdate(@RequestBody List&lt;Transfer&gt; rows) throws JSONException, InterruptedException {
  
      System.out.println("in transfer update section");
  
      return null;
  }
  </code></pre>
  
  <p>Why I could not pass the array object to the controller?
  Did I misunderstand the usage of the Ajax call?</p>
  
  <p>Thank you</p>