@RequestMapping(method = POST) public String save(@ModelAttribute("form") MeasuringSystem form, SessionStatus status) { measuringSystemService.save(form); status.setComplete(); return "redirect:/admin/ms"; }
@RequestMapping("/delete/{id}") public String delete(@PathVariable int id) { measuringSystemService.delete(id); return "redirect:/admin/ms"; }
@RequestMapping("/update/{id}") public String update(@PathVariable int id, Model model) { model.addAttribute("form", measuringSystemService.findOne(id)); model.addAttribute("measuringSystems", measuringSystemService.findAll()); return "admin-measuringSystem"; }
@RequestMapping public String show(Model model) { model.addAttribute("measuringSystems", measuringSystemService.findAll()); return "admin-measuringSystem"; }