title: Java Spring with thymeleaf checkbox non checked is Empty instead of false
body: <p>I have checkbox inside of my form :</p>
  
  <pre><code>  &lt;div class="form-check form-check-inline"&gt;
                          &lt;input type="checkbox" th:field="${search.titleIncl}" /&gt;
                          &lt;label class="form-check-label" th:for="${#ids.next('covered')}"&gt;Title&lt;/label&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>This checkbox by default should be on since search object has this value assigned as true. This works fine. What i expected from thsi checkbox is to send either true or false when its checked/unchecked. What i got now is True if its checked and nothing when not checked. That his a bit of an issue for me :</p>
  
  <p>In controller:</p>
  
  <pre><code>@GetMapping(value = Utils.MAPPING_INDEX)
  public ModelAndView index(@RequestParam("titleIncl") Optional&lt;Boolean&gt; titleIncl) {
      ...calling fillSearch inside of body....
  }
  
  
  private Search fillSearch(Optional&lt;Boolean&gt; titleIncl..) {
  
          Search search = new Search();
  
          //Get seach value if nothing provided give me default.
          search.setTitleIncl(titleIncl.orElse(search.isTitleIncl()));
          ...
  
          return search;
  }
  </code></pre>
  
  <p>Whole point of this form is to get user select what parts of the object he wants to search :
  <a href="https://i.stack.imgur.com/3VqFv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3VqFv.png" alt="enter image description here"></a></p>
  
  <p>So if he unselects checkbox and i dont send FALSE in optional, I run into problem.</p>
  
  <p>When user initialy goes into the site, he doesnt send any of these parameters so it behaves fine by setting everything to true.
  Bud once he initiates search and deselects parts he doesnt wanna search in, he still ends up with defaults and searches in everything.</p>
  
  <p><strong>So is there a simple way of sending Optional FALSE if checkbox value is not selected?</strong></p>
  
  <p>Note : </p>
  
  <ul>
  <li><p>By simple i mean without creating additional endpoint for this form search and no Javascript :)</p></li>
  <li><p>And yes the form is under GET request</p></li>
  </ul>