SEARCH BY

All

  • All
  • Java8
  • Spring

Inline if else condition in thymeleaf

Post a Comment
Here in this article we will see how to create inline if else condition in thymeleaf framework.

<p th:utext="${tfl.taskid != 0} ? ${tfl.locationname} : 'No location allocated in database' "></p>
							
In the above code tfl is a model attribute returned from Spring controller...
jaya
I love software designing, coding, writing and teaching...

Share this article

Related Posts

Post a Comment

Place your code in <em> </em> tags to send in comments | Do not add hyper links in commnet

Close

Subscribe our newsletter for the latest articles directly into your email inbox