title: Thymeleaf: conditional expression is not evaluated
body: <p>In my current spring project, one of the views have the following thymeleaf code:</p>
  
  <pre><code>  &lt;div class="input-group" th:each="item : ${role}" th:id="${item.getId()}"&gt;
      &lt;span class="input-group-addon" th:with="possui = 'not'"&gt;
        &lt;span th:each="item2 : ${usuario.getRole()}" th:if="${item.getId() == item2.getId()}" th:with="possui = 'yes'" class="glyphicon glyphicon-check" th:id="icon__${item.getId()}__" aria-hidden="true"&gt;&lt;/span&gt;
        &lt;span th:if="possui == 'not'" class="glyphicon glyphicon-unchecked" th:id="icon__${item.getId()}__" aria-hidden="true"&gt;&lt;/span&gt;
      &lt;/span&gt;
  
      &lt;input type="text" class="form-control" th:value="${item.getNome()}" disabled="disabled"/&gt;
  
      &lt;span class="input-group-btn"&gt;
        &lt;button class="btn btn-default" th:attr="data-id=${item.getId()}" type="button"&gt;
          &lt;span class="glyphicon glyphicon-refresh" aria-hidden="true"&gt;&lt;/span&gt;
        &lt;/button&gt;
      &lt;/span&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>in the first block from <code>input-group</code> (the one with the class <code>input-group-addon</code>), should be displayed the checked icon if the user has the role, or the unchecked icon if the user hasn't. But with the code above, only the checked icon is displayed.</p>
  
  <p>Anyone can see what's wrong with this code?</p>