[BAEL-1671] Iteration in Thymeleaf (#3987)

* [BAEL-1671] Iteration in Thymeleaf

* [BAEL-1671] Iteration in Thymeleaf

* [BAEL-1671] Iteration in Thymeleaf
This commit is contained in:
felipeazv 2018-04-26 12:44:41 +02:00 committed by Grzegorz Piwowarek
parent ba1ba8455d
commit 3998fff6a5
1 changed files with 10 additions and 2 deletions

View File

@ -22,15 +22,23 @@
<th th:text="#{msg.name}" />
<th th:text="#{msg.gender}" />
<th th:text="#{msg.percent}" />
<th th:text="index" />
<th th:text="count" />
<th th:text="first" />
<th th:text="last" />
</tr>
</thead>
<tbody>
<tr th:each="student: ${students}">
<tr th:each="student, iStat : ${students}" th:style="${iStat.odd}? 'font-weight: bold;'" th:alt-title="${iStat.even}? 'even' : 'odd'">
<td th:text="${student.id}" />
<td th:text="${{student.name}}" />
<td th:text="${student.name}" />
<td th:switch="${student.gender}"><span th:case="'M'"
th:text="Male" /> <span th:case="'F'" th:text="Female" /></td>
<td th:text="${#conversions.convert(student.percentage, 'Integer')}" />
<td th:text="${iStat.index}" />
<td th:text="${iStat.count}" />
<td th:text="${iStat.first}" />
<td th:text="${iStat.last}" />
</tr>
</tbody>
</table>