File tree 1 file changed +10
-2
lines changed
spring-thymeleaf/src/main/webapp/WEB-INF/views
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,23 @@ <h1>Student List</h1>
22
22
< th th:text ="#{msg.name} " />
23
23
< th th:text ="#{msg.gender} " />
24
24
< th th:text ="#{msg.percent} " />
25
+ < th th:text ="index " />
26
+ < th th:text ="count " />
27
+ < th th:text ="first " />
28
+ < th th:text ="last " />
25
29
</ tr >
26
30
</ thead >
27
31
< tbody >
28
- < tr th:each ="student: ${students} ">
32
+ < tr th:each ="student, iStat : ${students} " th:style =" ${iStat.odd}? 'font-weight: bold;' " th:alt-title =" ${iStat.even}? 'even' : 'odd' ">
29
33
< td th:text ="${student.id} " />
30
- < td th:text ="${{ student.name} } " />
34
+ < td th:text ="${student.name} " />
31
35
< td th:switch ="${student.gender} "> < span th:case ="'M' "
32
36
th:text ="Male " /> < span th:case ="'F' " th:text ="Female " /> </ td >
33
37
< td th:text ="${#conversions.convert(student.percentage, 'Integer')} " />
38
+ < td th:text ="${iStat.index} " />
39
+ < td th:text ="${iStat.count} " />
40
+ < td th:text ="${iStat.first} " />
41
+ < td th:text ="${iStat.last} " />
34
42
</ tr >
35
43
</ tbody >
36
44
</ table >
You can’t perform that action at this time.
0 commit comments