Пример #1
0
 @RequestMapping(value = "/updateUser", method = RequestMethod.POST)
 public String saveUser(Model model, UserBean userForm) {
   userService.update(userForm.getIdentity(), userForm);
   List<UserBean> users = userService.all();
   model.addAttribute("users", users);
   return "listUsers";
 }
Пример #2
0
 @RequestMapping(value = "/deleteUser", method = RequestMethod.GET)
 public String deleteUser(Model model, @RequestParam String identity) {
   userService.delete(identity);
   List<UserBean> users = userService.all();
   model.addAttribute("users", users);
   return "listUsers";
 }
Пример #3
0
 @RequestMapping(value = "/createUser", method = RequestMethod.POST)
 public String createNewUser(Model model, UserBean userForm) {
   userService.create(userForm);
   List<UserBean> users = userService.all();
   model.addAttribute("users", users);
   return "listUsers";
 }
Пример #4
0
 @RequestMapping(value = "/listUsers", method = RequestMethod.GET)
 public String listUsers(Model model) {
   List<UserBean> users = userService.all();
   model.addAttribute("users", users);
   return "listUsers";
 }