use of ua.model.UserModel in project Logos_Materials_October_2017 by VolodymyrZavada.
the class BaseController method showUserDetail.
@GetMapping("/user/{userId}/detail")
public String showUserDetail(Model model, @PathVariable("userId") int userId, @RequestParam("name") String name, @RequestParam("age") int age, @RequestParam("email") String email) {
UserModel userModel = new UserModel(userId, name, age, email);
model.addAttribute("user", userModel);
return "detail";
}
use of ua.model.UserModel in project Logos_Materials_October_2017 by VolodymyrZavada.
the class BaseController method showUsersPage.
@GetMapping("/users")
public String showUsersPage(Model model) {
List<UserModel> userModels = new ArrayList<>();
userModels.add(new UserModel(1, "Abram", 45, "abram@mail.com"));
userModels.add(new UserModel(2, "John", 35, "john@mail.com"));
userModels.add(new UserModel(3, "Tim", 34, "tim@mail.com"));
userModels.add(new UserModel(4, "Tom", 25, "tom@mail.com"));
userModels.add(new UserModel(5, "Adam", 89, "adam@mail.com"));
userModels.add(new UserModel(6, "R", 37, "r@mail.com"));
model.addAttribute("userList", userModels);
return "users";
}
Aggregations