kumarson

留下成长点滴...
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

自定义F7

Posted on 2013-08-27 16:22  kumarson  阅读(414)  评论(0编辑  收藏  举报

1、自定义弹出F7对话框

 1 KDBizPromptBox saleOrgF7 = new KDBizPromptBox();
 2 add(saleOrgF7, null);
 3 saleOrgF7.setVisible(false);
 4 saleOrgF7.setEnabledMultiSelection(true);
 5 saleOrgF7.setQueryInfo("com.kingdee.eas.fdc.sellhouse.app.SellProjectQuery");
 6 saleOrgF7.setDataBySelector();
 7 List lf=new ArrayList();
 8 if (saleOrgF7.getSelector().isCanceled() || saleOrgF7.getData() == null){
 9     com.kingdee.eas.rptclient.newrpt.util.MsgBox.showInfo("空的");
10 }else{
11     Object infos[] = (Object[]) saleOrgF7.getData();
12     for (int i = 0; i < infos.length; i++) {
13         lf.add(infos[i]);
14     }
15 }


1.1、自定义F7示例

 1 protected List showFilterDialog() {
 2         List fids = new ArrayList();
 3         KDBizPromptBox modelBox = new KDBizPromptBox();
 4         modelBox.setVisible(false);
 5         modelBox.setEnabledMultiSelection(true);
 6         modelBox.setQueryInfo("com.kingdee.eas.fdc.contract.app.ModelQuery");
 7         
 8         //设置过滤
 9         EntityViewInfo view = new EntityViewInfo();
10         FilterInfo filter = new FilterInfo();
11         filter.getFilterItems().add(new FilterItemInfo("description", "EAS3"+SysContext.getSysContext().getCurrentUserInfo().getNumber()));
12         view.setFilter(filter);
13         modelBox.setEntityViewInfo(view);
14         
15         modelBox.setDataBySelector();
16         if (modelBox.getSelector().isCanceled() || modelBox.getData() == null){
17 //            com.kingdee.eas.rptclient.newrpt.util.MsgBox.showInfo("没有选值");
18             SysUtil.abort();
19         }else{
20             Object infos[] = (Object[]) modelBox.getData();
21             for (int i = 0; i < infos.length; i++) {
22                 fids.add(((ModelInfo)infos[i]).getSimpleName().toString());
23                 System.out.println("----选中的模板编码:"+((ModelInfo)infos[i]).getSimpleName().toString());
24             }
25         }
26         return fids;
27     }