I use spring boot and thymeleaf
<th:block th:each="claim:${claimEditor}">
<table>
<tr>
<td>Number of claim : </td> <td th:text="${claim.numberOfClaim}"></td>
</tr>
<th:block th:unless="${#lists.isEmpty(claim.record)}">
<th:block th:each="record, iterStat:${claim.record}">
<tr>
<td th:rowspan="${record.size()} th:if="${iterStat.first}">Attribute : </td>
<td th:text="${record}"></td>
</tr>
</th:block>
</th:block>
</table>
</th:block>
I have the error
Malformed markup: Attribute "</th:block>" appears more than once in element
Seem like nested block is not allowed, is there an alternative?
In this specific case, you can move your
th:each
es onto thetable
and andtr
elements respectively:Edit: You are also missing a closing double quote after
th:rowspan="${record.size()}