@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"; }
@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"; }
@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"; }