コード例 #1
0
 @RequestMapping(value = "/admin/addUser.html", method = RequestMethod.GET)
 public ModelAndView addUser() {
   ModelAndView modelAndView = new ModelAndView();
   ModelMap modelMap = modelAndView.getModelMap();
   modelMap.put(ROLE, UserRole.values());
   modelAndView.setViewName(createUser);
   return modelAndView;
 }
コード例 #2
0
  @RequestMapping(value = "/admin/updateUser.html", method = RequestMethod.GET)
  public ModelAndView ajaxUpdateUser(String guid) {
    User currentUser = userService.findUserByGuid(guid);
    ModelAndView modelAndView = new ModelAndView(userInfo);
    ModelMap modelMap = modelAndView.getModelMap();
    modelMap.put(USER, currentUser);
    modelMap.put(ROLE, UserRole.values());

    return modelAndView;
  }