Changeset 9280859 for src/main/java/edu/gjoko/schedlr/controllers
- Timestamp:
- 02/01/23 22:35:56 (22 months ago)
- Branches:
- master
- Children:
- cc52b09
- Parents:
- 044bd76
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java
r044bd76 r9280859 1 1 package edu.gjoko.schedlr.controllers; 2 2 3 import edu.gjoko.schedlr.entity.Search; 3 4 import org.springframework.stereotype.Controller; 4 5 import org.springframework.ui.Model; 5 6 import org.springframework.web.bind.annotation.GetMapping; 7 import org.springframework.web.bind.annotation.ModelAttribute; 6 8 import org.springframework.web.bind.annotation.PostMapping; 7 9 … … 10 12 11 13 @GetMapping(name = "/homepage") 12 public String getHomePageTemplate(Model model) { 14 public String getHomePageTemplate(Model model, @ModelAttribute("search")Search search ) { 15 model.addAttribute("search", search); 13 16 return "homepage"; 14 17 } 15 18 16 19 @PostMapping(name = "/homepage") 17 public String postHomePageTemplate(Model model) { 20 public String postHomePageTemplate(Model model, @ModelAttribute("search")Search search) { 21 model.addAttribute("search", search); 22 return "homepage"; 23 } 24 25 @GetMapping("/search") 26 public String getAppointments(Model model, @ModelAttribute("search")Search search) { 27 model.addAttribute("search", search); 18 28 return "homepage"; 19 29 }
Note:
See TracChangeset
for help on using the changeset viewer.