<div>
<s:if test="#request.productPage.currentPage > 1">
<a href="store.action?currentPage=<s:property value='#request.productPage.currentPage - 1'/>">上一页</a>
</s:if>
<s:bean name="org.apache.struts2.util.Counter" id="counter">
<s:param name="first" value="0" />
<s:param name="last" value="#request.productPage.pageCount -1" />
<s:iterator>
<s:if test="current == #request.productPage.currentPage">
<s:property value="current" />
</s:if>
<s:else>
<a href="store.action?currentPage=<s:property value="current" />"><s:property value="current" /></a>
</s:else>
</s:iterator>
</s:bean>
<s:if test="#request.productPage.currentPage != #request.productPage.pageCount">
<a href="store.action?currentPage=<s:property value="#request.productPage.currentPage + 1" />">下一页</a>
</s:if>
总页数: <s:property value="#request.productPage.pageCount" />
</div>
分享到:
相关推荐
本资源适合刚接触Struts和Ognl的小伙伴交流学习,欢迎吐槽。
struts2的ognl
从官网checkout下来的源码,如果大家觉的区官网麻烦可以直接下载这个
struts2 中 OGNL表达式的使用struts2 中 OGNL表达式的使用
Struts2学习计划5---Struts2_OGNL(对象图导航语言)的学习
Struts2 OGNL---标签详解析 都有实例 适合初学者
struts2 ognl2.6.11源代码,官网上下要很麻烦,麻烦的事就我帮各位做了
主要是ognl的用法,很适合新手上路的,源代码很清晰可见,一看就懂
关于struts2 OGNL 详细教程,对初学者有帮助
struts2中ognl表达式的用法,详细介绍了ognl表达式与struts2基本标签的结合。
Struts2中ognl-2的源代码,从官网下载的
struts2 ognl源文件 在ECLIPSE导入后可方面的利于开发
对 Struts2 OGNL 的分析与简介
struts2 OGNL的主要用法 基本覆盖全部
NULL 博文链接:https://chaoyi.iteye.com/blog/2158731
Struts2的OGNL示例,使用Maven构建,导入请前先安装maven。
struts2OGNL表达式ActionContext及valuesStack.pdf
NULL 博文链接:https://chaoyi.iteye.com/blog/2161928
在struts2编程中,ognl帮助文档,你可导入到工程里,就可以查看相关文档。
博文参考:http://blog.csdn.net/u011638419/article/details/42041991