zoukankan      html  css  js  c++  java
  • ADF中遍历VO中的行数据(Iterator)

    在ADF中VO实质上就是一个迭代器,

    1.在Application Module的实现类中,直接借助VO实现类和Row的实现类

     TestVOImpl organizationUser = (TestVOImpl) this.getTestVO1();
     while(organizationUser.hasNext()){
             TestVORowImpl   userRow =(TestVORowImpl) organizationUser.next();
    }

    2.在Application Module的实现类中,按照行数来遍历

     ProcessTaskVOImpl processTaskVO = this.getProcessTaskVO1();
     Row[] processTaskRowSet = processTaskVO.getAllRowsInRange(); //
     for(int i=0,rowSetSize=processTaskRowSet.length;i<rowSetSize;i++){
          ProcessTaskVORowImpl processTaskRow =(ProcessTaskVORowImpl) processTaskRowSet[i];
    }

    3.在Manage bean中遍历

    BindingContext bindingContext = BindingContext.getCurrent();
    BindingContainer bindingContainer = bindingContext.getCurrentBindingsEntry();
    DCBindingContainer dcb = (DCBindingContainer)bindingContainer;
    DCIteratorBinding serviceLogIterator = dcb.findIteratorBinding("ServiceLogPolicyVO1Iterator");
    ServiceLogPolicyVOImpl vo = (ServiceLogPolicyVOImpl) serviceLogIterator.getViewObject();
       for (int i = 0, rowCount = vo.getEstimatedRowCount(); i < rowCount; i++) {
             ServiceLogPolicyVORowImpl serviceRowImpl = (ServiceLogPolicyVORowImpl)vo.getRowAtRangeIndex(i); 
    }
  • 相关阅读:
    hdu1085
    hdu1028
    hdu2189
    母函数
    博弈论
    nginx安装
    学习好站点
    nginx在linux下安装
    wget 命令用法详解
    U盘安装CentOS7的帖子
  • 原文地址:https://www.cnblogs.com/qizhelongdeyang/p/3822036.html
Copyright © 2011-2022 走看看