title: th:selected a number in a select/option with Thymeleaf doesn't work
body: <p>I have this code</p>
  
  <pre><code>&lt;div th:class="form-group"&gt;
      &lt;td&gt;&lt;label class="control-label leftMargin10 rightMargin10" scope="col" th:text="#{insertHours.hhFrom}"&gt;Attivita'&lt;/label&gt;&lt;/td&gt;
      &lt;td&gt;&lt;select class="form-control" th:field="*{hhFrom}"&gt;
          &lt;option th:each="i : ${#numbers.sequence(0, 23)}" th:value="${i}" th:text="${i}" th:selected="${ i==9 } "&gt;Options&lt;/option&gt;
      &lt;/select&gt;
      &lt;/td&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I try to add a condition in th:selected it doesn't work.</p>
  
  <p>I have also replaced with this code:</p>
  
  <pre><code>th:attr="${i==9}? selected=selected: '' "
  </code></pre>
  
  <p>but the result is the same. </p>
  
  <p>The HTML</p>
  
  <pre><code>&lt;select class="form-control" id="hhFrom" name="hhFrom"&gt;
      &lt;option value="0" selected="selected"&gt;0&lt;/option&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;option value="3"&gt;3&lt;/option&gt;
      &lt;option value="4"&gt;4&lt;/option&gt;
      &lt;option value="5"&gt;5&lt;/option&gt;
      &lt;option value="6"&gt;6&lt;/option&gt;
      &lt;option value="7"&gt;7&lt;/option&gt;
      &lt;option value="8"&gt;8&lt;/option&gt;
      &lt;option value="9"&gt;9&lt;/option&gt;
      &lt;option value="10"&gt;10&lt;/option&gt;
      &lt;option value="11"&gt;11&lt;/option&gt;
      &lt;option value="12"&gt;12&lt;/option&gt;
      &lt;option value="13"&gt;13&lt;/option&gt;
      &lt;option value="14"&gt;14&lt;/option&gt;
      &lt;option value="15"&gt;15&lt;/option&gt;
      &lt;option value="16"&gt;16&lt;/option&gt;
      &lt;option value="17"&gt;17&lt;/option&gt;
      &lt;option value="18"&gt;18&lt;/option&gt;
      &lt;option value="19"&gt;19&lt;/option&gt;
      &lt;option value="20"&gt;20&lt;/option&gt;
      &lt;option value="21"&gt;21&lt;/option&gt;
      &lt;option value="22"&gt;22&lt;/option&gt;
      &lt;option value="23"&gt;23&lt;/option&gt;
  &lt;/select&gt; 
  </code></pre>
  
  <p>Thanks in advance to answers</p>