2
« on: October 27, 2020, 10:17:01 pm »
When I create a new record in the grid it does not have a productid. My database insert statement creates and returns it. How do I update the grid with that productid?
Note: I do not want to refresh the entire grid - only the new record. i have checked the batch editing example but failed to understand in below code how dlist is gets the productid before returning the response.
@RequestMapping(value="/products/batch", method=RequestMethod.POST)
public @ResponseBody String batch(@RequestParam String list, HttpServletRequest request ){
HttpSession ses = fillInSession(request);
Map dlist = deserializeMap(list);
ArrayList updateList = (ArrayList)dlist.get("updateList");
ArrayList addList = (ArrayList)dlist.get("addList");
ArrayList deleteList = (ArrayList)dlist.get("deleteList");
this.updateList(updateList, ses);
this.addList(addList, ses);
this.deleteList(deleteList, ses);
return serializeMap(dlist);
}
Please help.