thymeleaf Using Lists with Thymeleaf Form table


Example

<table id="countryList">
    <thead>
        <tr>
            <th th:text="#{country.label.name}"> Country </th>
            <th th:text="#{country.label.capital}"> Capital </th>
            <th th:text="#{country.label.square}"> Square </th>
        </tr>
    </thead>
    <tbody>
        <tr th:each="country : ${countryList}">
            <td th:text="${country.name}"></td>
            <td th:text="${country.capital}"></td>
            <td th:text="${country.square}"></td>
        </tr>
    </tbody>
</table>