robert trudel
robert trudel

Reputation: 5779

thymeleaf and condition and list size

I use thymeleaf 3 and I try to use an "and" in a condition and use the size of a list in the condition

<div th:if="${param.isGenerated and #lists.size(param.options) lt 1}" th:remove="tag">
    <label th:text="${param.value}"></label>
</div>

I get this error

org.attoparser.ParseException: Exception evaluating SpringEL expression:

Upvotes: 1

Views: 2842

Answers (1)

Marc Collin
Marc Collin

Reputation: 499

try

${param.isGenerated and #lists.isEmpty(param.options)}

Upvotes: 2

Related Questions