如何在Thymeleaf上设置多个条件

时间:2014-10-03 06:17:02

标签: spring thymeleaf

我想在这样的Thymeleaf模板上设置一些条件, 但它没有用。

<li th:if="${entry.description != null && entry.owner == true}" th:each="entry : ${entryList}" class="group">

如何正确使用此代码?

1 个答案:

答案 0 :(得分:11)

替换

"${entry.description != null && entry.owner == true}"

"${entry.description != null and entry.owner == true}"

作为参考,你可以查看这个帖子: http://forum.thymeleaf.org/How-to-have-multiple-condition-in-an-th-if-tag-td4025931.html

让我知道你怎么去