OFBIZ 分页代码
来源:互联网 发布:linux查看tomcat日志 编辑:程序博客网 时间:2024/05/22 00:30
- 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
- ofbiz之服务实体api积累
- WEB-INF目录资源访问受限
- 站长应该如何选择网站程序
- OFBiz 开发需要用到的几个重要(配置)文件
- poj 1040 Transportation DFS剪枝
- OFBIZ 分页代码
- C++类对象创建过程(分配空间、赋值和初始化、对象初始化顺序、虚函数表指针)
- CString——Left、Right、Find、ReverseFind
- OFBiz实现任务调度和JOB运行机制
- Ofbiz: 自定义表单校验
- 安装win7过程中选择磁盘时出现的gpt格式无法安装的问题的解决
- 会画圈的数
- hdoj_2717Catch That Cow
- Windows中通过VMare来安装Linux的方法