[img]http://dl.iteye.com/upload/attachment/0081/2864/8655d866-1a54-3994-b873-67d5854a8dd5.jpg[/img]
[color=red]$!{velocityCount}数量是从1开始的,所以获取下标直接-1就可以了,关于总数量直接$!{list.size()}。[/color]
[color=red]$!{velocityCount}数量是从1开始的,所以获取下标直接-1就可以了,关于总数量直接$!{list.size()}。[/color]
#foreach($fundDet in $!list)
<tr bgcolor="#f3f3f3">
<td><input name="" type="checkbox" value="" style="border:none"/></td>
<td height="32px">$!{velocityCount}</td>
<td height="32px">$!{list.size()}</td><!-- debitAmt -->
<td height="32px">$!{fundDet.creditAmt}</td>
<td height="32px">$!{fundDet.profitAmt}</td>
<td height="32px">$!{fundDet.fundSource}</td>
<td height="32px">$!{fundDet.preBalance}</td>
<td height="32px">$!{fundDet.balance}</td>
<td height="32px">$!{fundDet.transSerial}</td>
<td height="32px">$!{fundDet.transDate}</td>
<td height="32px">$!{fundDet.transTime}</td>
<td height="32px">$!{fundDet.comments}</td>
<td height="32px">$!{fundDet.status}</td>
<td height="32px">$!{fundDet.settleDate}</td>
</tr>
本文介绍Velocity模板引擎中变量计数及列表操作的方法,包括如何正确地在模板中使用velocityCount进行计数显示,以及如何获取列表的总大小。同时展示了具体的表格元素遍历示例。
1761

被折叠的 条评论
为什么被折叠?



