コード例 #1
0
 @RequestMapping(value = "/edit", method = RequestMethod.POST)
 public void update(ModelMap modelMap, @Valid UserDashlet entity, BindingResult result) {
   service.saveModel(modelMap, entity, result);
 }
コード例 #2
0
 @RequestMapping(value = "/new", method = RequestMethod.POST)
 public String create(ModelMap modelMap, @Valid UserDashlet entity, BindingResult result) {
   return service.saveModel(modelMap, entity, result)
       ? "redirect:edit?id=" + entity.getId()
       : null;
 }