I have code like that
function loadAjaxData(code) {
$.ajax({
type : 'POST',
url : 'loadData.html',
dataType : 'json',
data : {
"limited_num" : limited_num,
"search_bunrui_code" : code,
"orderType" : orderType,
"search_base_date_from" : search_base_date_from,
"search_base_date_to" : search_base_date_to,
"compare_date_from" : compare_date_from,
"compare_date_to" : compare_date_to
},
success : function(data) {
},
});
As i know data above is to pass param to server. and in the server it return for me an array object of Json The question is how can i get that array in the success Thank for any help
here is the code in the server
@Result(name="loadData",type="json"),
public ArrayList<OrderDeliverAmoutReturnList> returnList;
@Action(value="loadData", results = {
@Result(name="loadData", type="json", params ={"includeProperties", "returnList"})
})
public String loadData() throws Exception{
OrderDeliverAmoutSearchTO searchTo=this.setCondition();
returnList=bunruiSummaryService.getBunruiSyouhinShopDayList(searchTo);
total=this.caculateTotal();
return "loadData";
}