I want to send a list of object identifier (generated by a user select flag) using POST , so I can convert java.util.List<MyObject>using MyObjectEditor.
So can this be done?
@InitBinder
public void initBinder (WebDataBinder binder) {
binder.registerCustomEditor(MyObject.class, new MyObjectEditor());
}
@RequestMapping (value = "", method = RequestMethod.POST)
public String action (@RequestParam List<MyObject> myList, Model model) {
}
And my POST will look like this:
myList[0] = 12
myList[1] = 15
myList[2] = 7
Thank!
source
share