title: Model Boolean attribute value not showing in HTML (Spring MVC)
body: <p><strong>Controller:</strong></p>
  
  <pre><code>@RequestMapping("/approveRequestById")
      public String approveRequestById(Principal principal, @RequestParam(value="id") String requestId, Model model) {
          Users manager = usersRepository.findOneByInitialName(principal.getName());
          RequestDO request = requestRepository.findOne(Long.parseLong(requestId));
          requestRepository.updateRequestStatusByRequestId(RequestStatus.APPROVED, request.getId());
          Users employee = usersRepository.findOne(request.getUsers().getId());
          // Instead of getting the same RequestDO object from DB, I just updated it's status for using in mail correctly.
          request.setStatus(RequestStatus.APPROVED);
  
          model.addAttribute("requestFlag", true);
          log.info("Model: " + String.valueOf(model));
  
          /***
           Send Notification Mail to Employee
           ***/
          mailUtil.sendNotificationEmailWithTemplating(employee, manager, request);
  
          return "redirect:/requests";
      }
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;th:block th:switch="${requestFlag}"&gt;
                      &lt;th:block th:case="true"&gt;
                          &lt;div style="width: 100%; height: 30px; color: #fff; background: #C00000; text-align: center; padding: 10px;"&gt;&lt;span
                                  style="font-weight: bold; padding-bottom: 10px; "&gt;The request from your mailbox has been approved!&lt;/span&gt;&lt;/div&gt;&lt;br&gt;
                      &lt;/th:block&gt;
                  &lt;/th:block&gt;
  </code></pre>
  
  <p><strong>Log output when landing on page after email link:</strong></p>
  
  <pre><code>Model: {currentRole=EMPLOYEE, numRequests=0, requestFlag=true}
  </code></pre>
  
  <p>The user accesses a page from an email ink, i.e. <code>http://localhost:8181/request/approveRequestById?id=2</code>. Once on this page, the controller inserts the model attribute <code>requestFlag</code> and sets it to <code>true</code>. I can see in both the log and debug mode that the model does in fact add this attribute to the model when the request mapping is called, i.e. <code>/request/approveRequestById</code>.</p>
  
  <p>My problem is that the logic is not working on the front-end. The div does not show. If there is a requestFlag equal to true, it should show a div. I can print the value using <code>&lt;th:block th:text="@{requestFlag}"&gt;Request Flag&lt;/th:block&gt;</code> but it doesn't give me the boolean value I want. Can Booleans not be rendered via Thymeleaf? The other strings in the included model print just fine. Am I missing something fundamental in terms of the order of how templates are rendered? All help greatly appreciated.</p>