1

I am new to thymeleaf and i've got a problem in performing if condition.The code i've written is

<tr th:if="${id &eq; 1 and mobNumber &eq; 1}" height="40" valign="top">
          //some code here
</tr>

The thing is this piece of code when written the web page keeps on loading.Can anyone tell me the right way to perform this action.

  • possible duplicate of [How to do if-else in Thymeleaf?](http://stackoverflow.com/questions/13494078/how-to-do-if-else-in-thymeleaf) – Makoto Dec 19 '13 at 05:24
  • If that provided the answer to your question, you should post it as a solution, @user2078883. – Chris Forrence Dec 19 '13 at 17:22

1 Answers1

2

Yo I got it just by replacing &eq; to == and it works excellently.I changed the code to

<tr th:if="${id==1 and mobNumber==1}" height="40" valign="top">
      //some code here
</tr>
Lucky
  • 16,787
  • 19
  • 117
  • 151