`
wmhx
  • 浏览: 1100 次
  • 性别: Icon_minigender_1
  • 来自: 乌鲁木齐
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

[rapid-framework] 分页组件的一个bug

阅读更多
分页组件的一个bug,情况和下面的页面描述是一致,不知道是什么情况

http://www.iteye.com/topic/1048252
还有:
http://code.google.com/p/mybatis/issues/detail?id=331&colspec=ID%20Type%20Component%20Status%20Priority%
20Version%20Target%20Summary%20Reporter&start=100,


在BaseIbatis3Dao.java中,如下代码会有问题,filter有问题
List list = sqlSessionTemplate.selectList(statementName, filters,page.getFirstResult(),page.getPageSize()); page.setResult(list);
return page;

换成List list = sqlSessionTemplate.selectList(statementName, filters);就可以正常的执行sql了,但分页没了,

期待改进

已经提交给
rapidframework了,
http://rapidframework.group.iteye.com/group/topic/27397
分享到:
评论
1 楼 wmhx 2011-10-23  
			<!-- 
			 <if test="@Ognl@isNotEmpty(stranspricekeylist)">
				<foreach item="stranspricekey" index=""
					collection="stranspricekeylist" open="and (" separator="or"
					close=")">
					transprice = #{stranspricekey}
				</foreach>
			</if>
			 -->
			<!-- 为了避免分页bug使用下面的 -->
			<if test="@Ognl@isNotEmpty(stranspricekeylist)">
				<foreach item="stranspricekey" index=""
					collection="stranspricekeylist" open="and (" separator="or"
					close=")">
					transprice = '${stranspricekey}'
				</foreach>
			</if>


如上面的方式
transprice = #{stranspricekey}
换成
transprice = '${stranspricekey}'
是可以解决问题的
但这样硬编码应该不好,也不是根本解决办法, 先这样

相关推荐

Global site tag (gtag.js) - Google Analytics