use of ua.spring.web.entity.Student in project Logos_Materials_October_2017 by VolodymyrZavada.
the class StudentController method showStudentForm.
@GetMapping("/add")
public String showStudentForm(Model model) {
LinkedHashMap<String, String> countryOptions = new LinkedHashMap<>();
countryOptions.put("BR", "Brazil");
countryOptions.put("FR", "France");
countryOptions.put("DE", "Germany");
countryOptions.put("IN", "India");
countryOptions.put("US", "United States of America");
countryOptions.put("UA", "Ukraine");
List<String> radioOptions = new ArrayList<>();
radioOptions.add("Java");
radioOptions.add("C#");
radioOptions.add("PHP");
radioOptions.add("Ruby");
model.addAttribute("studentModel", new Student());
model.addAttribute("countries", countryOptions);
model.addAttribute("favoriteLanguages", radioOptions);
model.addAttribute("studentDegrees", StudentDegree.values());
return "student-add";
}
Aggregations