use of ua.springboot.web.entity.User in project Logos_Materials_October_2017 by VolodymyrZavada.
the class UserController method showAddUserPage.
@GetMapping("/add")
public String showAddUserPage(Model model) {
LinkedHashMap<String, String> countryOptions = new LinkedHashMap<>();
countryOptions.put("BR", "Brazil");
countryOptions.put("IN", "India");
countryOptions.put("UA", "Ukraine");
List<String> languages = new ArrayList<>();
languages.add("JAVA");
languages.add("C#");
languages.add("PHP");
languages.add("JS");
model.addAttribute("userRoles", UserRole.values());
model.addAttribute("languagesList", languages);
model.addAttribute("countriesList", countryOptions);
model.addAttribute("userModel", new User());
return "user/add";
}
use of ua.springboot.web.entity.User in project Logos_Materials_October_2017 by VolodymyrZavada.
the class UserEditor method setAsText.
@Override
public void setAsText(String text) throws IllegalArgumentException {
User user = userService.findUserById(Integer.valueOf(text));
setValue(user);
}
Aggregations