@RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "text/html") public String delete( @PathVariable("id") Integer id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) { Oldgroup oldgroup = Oldgroup.findOldgroup(id); oldgroup.remove(); uiModel.asMap().clear(); uiModel.addAttribute("page", (page == null) ? "1" : page.toString()); uiModel.addAttribute("size", (size == null) ? "10" : size.toString()); return "redirect:/oldgroups"; }
@RequestMapping(value = "/{id}", params = "form", produces = "text/html") public String updateForm(@PathVariable("id") Integer id, Model uiModel) { populateEditForm(uiModel, Oldgroup.findOldgroup(id)); return "oldgroups/update"; }
@RequestMapping(value = "/{id}", produces = "text/html") public String show(@PathVariable("id") Integer id, Model uiModel) { uiModel.addAttribute("oldgroup", Oldgroup.findOldgroup(id)); uiModel.addAttribute("itemId", id); return "oldgroups/show"; }