Struts2 数据分页
来源:互联网 发布:python rawurlencode 编辑:程序博客网 时间:2024/06/05 14:41
1、创建分页公共页面pagelist.jsp
<s:if test="pagination.tatalPage!=0"><table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td valign="bottom" align="nowrap" style="width:40%;">总记录:<s:property value="pagination.totalRecord"/>条 每页:<s:property value="pagination.size"/>条 页码:第<s:property value="pagination.currentPage"/>页/共<s:property value="pagination.totalPage"/>页</td><td valign="bottom" align="right" nowrap="nowrap" style="width:60%"> <s:url action"%{url}" id="first"> <s:param name="action" value="action"/> <s:param name="pagination.currentPage" value="1"/> </s:url> <s:url action"%{url}" id="first"> <s:param name="action" value="action"/> <s:param name="pagination.currentPage" value="pagination.currentPage+1"/> </s:url> <s:url action"%{url}" id="first"> <s:param name="action" value="action"/> <s:param name="pagination.currentPage" value="pagination.currentPage-1"/> </s:url><s:url action="%{url}" id="last"><s:param name="action" value="action"/><s:param name="pagination.currentPage" value="pagination.totalPage"/></s:url><s:if test="pagination.currentPage==1"> <span class="current">首页</span> <span class="current">上一页</span></s:if><s:else><s:a href="%{first}" cssStyle="margin-right:5px;">首页</s:a><s:a href="%{prior}" cssStyle="margin-right:5px;">上一页</s:a></s:else><s:if test="pagination.currentPage==pagination.totalPage||pagination.totalPage==0"> <span class="current">下一页</span> <span class="current">末页</span></s:if><s:else><s:a href="%{next}" cssStyle="margin-right:5px;">下一页</s:a><s:a href="%{last}" cssStyle="margin-right:5px;">末页</s:a></s:else></td></tr></table></s:if>
2、考生页面
<table cellspacing="1" border="0" id="GridView1" style="color: #333333;width:100%"><tr class="GridHeader" style="height:25px;"> <th scope="col">考生编号</th> <th scope="col">考试号</th> <th scope="col">考生姓名</th> <th scope="col">手机</th> <th scope="col">操作</th></tr><s:if test="%{stuList.size()!=0}"> <s:iterator value="%{stuList}" id="stu" status="status"> <tr <s:if test="#status.odd">class="GridDataRow"</s:if> <s:else>class="GridAltRow"</s:else> align="center"> <td align="center"> <s:property value="#status.count"/></td> <td align="center">&nbps;<s:property value="#stu.stuNo"></td> <td align="center">&nbps;<s:property value="#stu.name"></td> <td align="center">&nbps;<s:property value="#stu.mobile"></td> <td> <a style="cursor:hand;" onclick="location.href='student.action?action=edit&stuNo=<s:property value="stu.stuNo">'"> <img src="../images/Edit.gif"/> <a style="cursor:hand;" onclick="location.href='student.action?action=del&stuNo=<s:property value="#stu.stuNo">'"> <img src="../images/del.gif"/></a> </td> </tr></s:iterator></s:if><s:else><tr> <td align="center" width="100%" colspan="5"> 无任何考生信息! </td></tr> </s:else> </table>
3、引入分页页面
<div id="page"> <jsp:include page="../commons/pagelist.jsp"/></div>
0 0
- Struts2 数据分页
- Struts2+Hibernate 实现数据分页
- struts2--操作数据库(数据分页)
- struts2分页
- struts2分页
- struts2 分页
- Struts2 分页
- struts2 分页
- struts2分页
- struts2 分页
- Struts2 分页
- Struts2 分页
- Struts2分页
- struts2分页代码
- struts2+spring+hibernate分页
- struts2+hibernate分页
- struts2 derby paging 分页
- Struts2简单分页
- 排序函数
- QQ第三方登录
- java serializable 序列化
- JQuery中的 ajax 简单应用
- 《如何阅读一本书》读书笔记
- Struts2 数据分页
- OpenCV中IplImage图像格式与BYTE图像数据的转换
- poj 3074 Sudoku
- kafka深入理解
- opencv内存管理器2-cvSeqPartition聚类
- Linux实用工具(一)
- POJ 3279-Fliptile(母牛翻方格-开关问题)
- 已知平面三点坐标求其中两条边之间的夹脚
- 第16周阅读程序3