var form = $('#myForm');
form.submit(function() {
var selectedItems = $('myTable').data("selectedItems");
form.append('selectedItems');
var data = form.serialize();
var url = "/myController/formData";
$.ajax({
url: url,
type: 'POST',
data: data
});
});
我试图在Controller中获取它:
@RequestMapping(value="/myController")
public class myController
{
@ResponseBody
@RequestMapping(value="/formData", method=RequestMethod.POST)
public void formData(final Model mymodel)
{
//some actions
}
}
我需要知道如何从jQuery返回的数据中获取列表。