Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <div class="form-check form-check-inline">
  2. <input type="checkbox" th:field="${search.titleIncl}" />
  3. <label class="form-check-label" th:for="${#ids.next('covered')}">Title</label>
  4. </div>
  5.  
  6. @GetMapping(value = Utils.MAPPING_INDEX)
  7. public ModelAndView index(@RequestParam("titleIncl") Optional<Boolean> titleIncl) {
  8. ...calling fillSearch inside of body....
  9. }
  10.  
  11.  
  12. private Search fillSearch(Optional<Boolean> titleIncl..) {
  13.  
  14. Search search = new Search();
  15.  
  16. //Get seach value if nothing provided give me default.
  17. search.setTitleIncl(titleIncl.orElse(search.isTitleIncl()));
  18. ...
  19.  
  20. return search;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement