Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="form-check form-check-inline">
- <input type="checkbox" th:field="${search.titleIncl}" />
- <label class="form-check-label" th:for="${#ids.next('covered')}">Title</label>
- </div>
- @GetMapping(value = Utils.MAPPING_INDEX)
- public ModelAndView index(@RequestParam("titleIncl") Optional<Boolean> titleIncl) {
- ...calling fillSearch inside of body....
- }
- private Search fillSearch(Optional<Boolean> titleIncl..) {
- Search search = new Search();
- //Get seach value if nothing provided give me default.
- search.setTitleIncl(titleIncl.orElse(search.isTitleIncl()));
- ...
- return search;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement