设置查询对话框的F7

1.定义自己的处理类
public class MyQueryProcessor extends FMDefaultQueryProcessor {
@Override
public void process() throws Exception{
super.process();
String field = getField();
if(field.equals("company.name")){
Object editor = getEditor();
if(editor instanceof KDBizPromptBox) {
KDBizPromptBox prmtBox = (KDBizPromptBox) editor;
/*prmtBox.setQueryInfo("com.kingdee.eas.ma.budget.MyCompanyOrgUnitQuery"); EntityViewInfo evi=new EntityViewInfo();
FilterInfo filterInfo=new FilterInfo();
filterInfo.getFilterItems().add(new FilterItemInfo("isCostOrgUnit",1, CompareType.EQUALS));
filterInfo.getFilterItems().add(new FilterItemInfo("isCompanyOrgUnit",1, CompareType.EQUALS));
evi.setFilter(filterInfo);
prmtBox.setEntityViewInfo(evi);*/
prmtBox.setSelector(new com.kingdee.eas.ma.budget.client.BgCompanyF7());
}
}
}
}
2.在ListUI中重写initCommonQueryDialog方法
 @Override
protected CommonQueryDialog initCommonQueryDialog() {
CommonQueryDialog queryDlg = super.initCommonQueryDialog();
queryDlg.setProcessor(new MyQueryProcessor());
return queryDlg;
}

 
上一篇:关于实现一个基于文件持久化的EventStore的核心构思


下一篇:winform 自定义分页控件 及DataGridview数据绑定