How do I do the conditional operator like this in thymeleaf?
Ex: condiction ? result1 : result2
Looks like it's just...
<tr th:class="${row.even}? 'even' : 'odd'">
...
</tr>
<tr th:class="${row.even}? (${row.first}? 'first' : 'even') : 'odd'">
...
</tr>
<tr th:class="${row.even}? 'alt'">
...
</tr>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With