分页显示中关于"序号"的问题

Posted O_wen 快到碗里来

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了分页显示中关于"序号"的问题相关的知识,希望对你有一定的参考价值。

项目开发中要求列表显示要明显看到总条目数,所以就要求序号从1开始。

 

如下为从1开始的序号展示:

<s:iterator value="#request.pageView.records" var="model" status="stat">

<tr>

<td width="20%">${(request.pageView.currentpage-1)*request.pageView.maxresult+stat.count}</td>

</tr>

</s:iterator>

 

currentpage:表示当前页码

maxresult:每页显示条数

stat.count:iterator的索引为stat.index(从0开始),stat.count(从1开始)。

以上是关于分页显示中关于"序号"的问题的主要内容,如果未能解决你的问题,请参考以下文章