【发布时间】:2018-06-02 11:55:14
【问题描述】:
请帮忙,我在 freemarker 中找不到如何从 thymeleaf 转换的指南: lists.isEmpty 和 for each
<th:block th:if="${#lists.isEmpty(employees)}">
<h3>No employee</h3>
</th:block>
<th:block th:unless="${#lists.isEmpty(employees)}">
<tr th:each="contact,iterStat : ${employees}">
<td th:text="${iterStat.count}"></td>
<td th:text="${contact.name}"></td>
<td th:text="${contact.phone}"></td>
谢谢!
【问题讨论】:
-
几乎没有专门的指南...但是如果您查看 FreeMarker 手册中的
#list、#if和${...},您肯定可以做到。
标签: thymeleaf freemarker