OFBIZ 分页代码
来源:互联网 发布:网络电视机用机顶盒吗 编辑:程序博客网 时间:2024/05/19 02:01
- int viewSize = GlobalConstant.VIEW_SIZE;
- int dataSize = 0;
- int viewIndex = 0;
- String temp = (String) map.get("viewIndex");
- if (UtilValidate.isNotEmpty(temp)) {
- try {
- viewIndex = Integer.valueOf(temp);
- } catch (NumberFormatException e) {
- viewIndex = 0;
- Debug.logError(e.getMessage().toString(), module);
- }
- }
- int lowIndex = viewIndex * viewSize + 1;
- int highIndex = (viewIndex + 1) * viewSize;
- List<EntityCondition> condition = makeCondition(map);
- EntityListIterator eli = null;
- List<GenericValue> product = null;
- try {
- eli = delegator.find("test", EntityCondition.makeCondition(condition), null, null, UtilMisc
- .toList(sortBy), null);
- product = eli.getPartialList(lowIndex, viewSize);
- eli.last();
- dataSize = eli.currentIndex();
- } catch (GenericEntityException e) {
- Debug.logInfo(e.getMessage().toString(), module);
- } finally {
- try {
- if (eli != null) {
- eli.close();
- eli = null;
- }
- } catch (GenericEntityException e) {
- Debug.logError(e.getMessage().toString(), module);
- }
- }
- if (highIndex > dataSize) {
- highIndex = dataSize;
- }
最主要的是:使用find方法,EntityListIterator现调用getPartialList方法
- OFBIZ 分页代码
- OFBIZ 分页代码
- OFBIZ 分页代码
- Ofbiz 分页代码
- ofbiz 分页代码
- OFBIZ 分页代码
- OFBiz框架实现分页效果
- ofbiz缺省国家代码
- ofbiz框架入门例子详解-------分页篇
- ofbiz
- OFBiz
- OFBIZ
- OFBiz
- ofbiz
- ofbiz
- OFBIZ
- OFBIZ
- OFBIZ
- RTP与RTCP协议介绍
- Windows Mobile 开发者新手上路指南
- WM_DRAWITEM与DrawItem()的讨论
- log4j通过SocketAppender将日志内容发送到远程服务器
- 两款免费软件,合起来可以替代UltraEdit
- OFBIZ 分页代码
- 用委托实现回调
- 触发器
- 工作中的一些小总结
- android 很难找的xml 转义符
- 动态绘制图形的基本思路
- IIS httpd.ini rewrite 重写的时候如何忽略查询字符串?
- Android 开发性能优化简介
- Android 开发源码分享