ADF:定义子查询

来源:互联网 发布:ubuntu下载器 编辑:程序博客网 时间:2024/06/03 00:39
定义子查询的两种方法:1. 在Vo的Query里添加 view Criteria,拖至.jspx 中使用标准的查询即 panel query2. 自定义查询自定义所要查询条件,在查询按钮上做 action-listener,manager bean 中方法定义如下:Hashtable hs = new Hashtable();//定义一个HashtableObject mCode = this.getExpenseItemType().getValue();//获得条件对象的值if(mCode!= null) //一定要加上限制,不然要有例外发生 hs.put("ExpenseTypeId",mCode);//控制条件OperationBinding op = (OperationBinding)ADFUtil.findOperation("searchFndExpenseConditon");“searchFndExpenseConditon” 在AM AMIMP.java中定义,定义如下: public void searchFndExpenseConditon(HashtablesearchCondition){ CustomViewImpl exphead = this.getExpsFndExpenseVO1(); if(searchCondition!= null){ exphead = this.getFilteredCustomView(exphead,searchCondition); exphead.executeQuery();}elseexphead.executeQuery();}Map params = op.getParamsMap();params.put( "searchCondition", hs);op.execute();
原创粉丝点击