Task 4: Display Search Results

Once you have your displaySearchResults handler passing information to the view, you need to display the data.

  1. In search.html, create a loop to display each job passed in from the controller.
  2. Put the job results into a set of tables, similar to what you did for the list-jobs view.
Tip

You can reuse the code you just wrote in list-jobs.html by defining a new fragment in that file. Then you need to include that fragment in search.html.

For the fragment to work properly in both files, the variables passed in by model.addAttribute() must use the same names.