Ejemplo n.º 1
0
 @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";
 }
Ejemplo n.º 2
0
 @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";
 }
Ejemplo n.º 3
0
 @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";
 }