Closed pconrad closed 4 years ago
The other two web apps (mapache-search. and open-lab-scheduler) have support for flash messages.
Flash messages are a way of communicating error messages to the user in a lightweight manner, and are a common feature of web applications.
To add them, you need to add the divs shown:
</nav>
Add those <div> elements into src/main/resources/templates/fragments/bootstrap_nav_header.html immediately after the </nav> closing tag.
<div>
src/main/resources/templates/fragments/bootstrap_nav_header.html
Then, you can convert messages such as this one in src/main/java/edu/ucsb/cs56/ucsb_courses_search/controller/SearchByInstructorController.java
src/main/java/edu/ucsb/cs56/ucsb_courses_search/controller/SearchByInstructorController.java
model.addAttribute("error_message", "Error: instructor name must not be empty");
To use flash messages similar to this code from open-lab-scheduler
open-lab-scheduler
The other two web apps (mapache-search. and open-lab-scheduler) have support for flash messages.
Flash messages are a way of communicating error messages to the user in a lightweight manner, and are a common feature of web applications.
To add them, you need to add the divs shown:
</nav>
tag.Add those
<div>
elements intosrc/main/resources/templates/fragments/bootstrap_nav_header.html
immediately after the</nav>
closing tag.Then, you can convert messages such as this one in
src/main/java/edu/ucsb/cs56/ucsb_courses_search/controller/SearchByInstructorController.java
To use flash messages similar to this code from
open-lab-scheduler