Exemplo n.º 1
0
 @RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "text/html")
 public String delete(
     @PathVariable("id") Long id,
     @RequestParam(value = "page", required = false) Integer page,
     @RequestParam(value = "size", required = false) Integer size,
     Model uiModel) {
   Base base = baseService.findBase(id);
   baseService.deleteBase(base);
   uiModel.asMap().clear();
   uiModel.addAttribute("page", (page == null) ? "1" : page.toString());
   uiModel.addAttribute("size", (size == null) ? "10" : size.toString());
   return "redirect:/bases";
 }
Exemplo n.º 2
0
 @RequestMapping(value = "/{id}", params = "form", produces = "text/html")
 public String updateForm(@PathVariable("id") Long id, Model uiModel) {
   populateEditForm(uiModel, baseService.findBase(id));
   return "bases/update";
 }
Exemplo n.º 3
0
 @RequestMapping(value = "/{id}", produces = "text/html")
 public String show(@PathVariable("id") Long id, Model uiModel) {
   uiModel.addAttribute("base", baseService.findBase(id));
   uiModel.addAttribute("itemId", id);
   return "bases/show";
 }