title: Conditional inline formatting with thymeleaf attributes
body: <p>I want to conditionally style elements by comparing two attributes. </p>
  
  <ol>
  <li>a url parameter 'customerID'</li>
  </ol>
  
  <blockquote>
    <p><a href="http://localhost:8080/home?customerID=3" rel="nofollow noreferrer">http://localhost:8080/home?customerID=3</a></p>
  </blockquote>
  
  <ol start="2">
  <li>a model attribute</li>
  </ol>
  
  <blockquote>
    <p>th:each=" customer : ${customers}"</p>
  </blockquote>
  
  <p>I want to change the background of a button if these two parameters are equal. I'm using inline styling with thymeleaf. </p>
  
  <pre><code>th:style="${param.customerID == customer.id ? 'background-color:green' : 'background-color:red'}"
  </code></pre>
  
  <p>but the result of the condition is always false even when the two arguments are equal. </p>
  
  <pre><code>    &lt;div class="user-list"&gt;
      &lt;div class="active-btn-group" id="active-button-group" th:each=" customer : ${customers}"&gt;
  
          &lt;p th:text="${param.customerID}"&gt;Test&lt;/p&gt;
          &lt;p th:text="${customer.id}"&gt;Test&lt;/p&gt;
          &lt;button th:id="${customer.id}" th:style="${param.customerID == customer.id ? 'background-color:green' : 'background-color:red'}"&gt;
  
          &lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How should I change the about inline formatting expression?</p>