1
在loginHistory.scala.html文件中,我有一个List,我想按照相反的顺序进行交换。我试过这个:播放框架模板,向后遍历列表
@for(index <- historyList.size until 0) {
<tr class="@if(index % 2 == 0){normalRow}else{alternateRow}">
<td class="col-date-time">@historyList(index).getFormattedDate</td>
<td class="col-result">@historyList(index).getLoginStatus</td>
<td class="col-protocol">@historyList(index).getProtocol</td>
<td class="col-ip-address">@historyList(index).getIpAddress</td>
</tr>
}
但是我最终得到一个空表。