<tr th:each="prod : ${prods}">
<td th:text="${prod.name}">Product name</td>
<td th:text="${prod.price}">Product price</td>
</tr>
That "prod : ${prods}" attribute value you see above means "for each element in the result of evaluating ${prods}, repeat this fragment of template setting that element into a variable called prod".
A collection can be any java.util.Iterable, a java.util.Map (iteration variables will be a java.util.Map.Entry), or an array. @author Daniel Fernández @since 1.0
|
|