EAS BOS 代码打开新界面,上下文参数传递

Map map = new UIContext(this);//可以在Map  里面设置要显示的数据	
map.put("arg0", arg0);
map.put("arg1", arg1);
map.put("arg2", arg2);

IUIWindow uiWindow = null;

//UIFactoryName.NEWTAB表示已新页签的形式打开新界面
//还有UIFactoryName.NEWWIN(新窗口)、UIFactoryName.MODEL(小窗口)等形式,根据自己需要选择
//SynergyApprovalEditUI.class.getName()为需要打开的页面的类名
//OprtState.VIEW表示打开的新界面的状态为只读
//还有OprtState.ADDNEW(新增)、OprtState.EDIT(编辑)等
uiWindow = UIFactory.createUIFactory(UIFactoryName.NEWTAB).create(
    SynergyApprovalEditUI.class.getName(), map, null, OprtState.VIEW);
		
if(getUIWindow() != null)
    getUIWindow().close();//关闭当前界面

if(uiWindow != null)
    uiWindow.show();//打开新界面
//从上一个界面传递过来的参数在新界面中获取
Object obj1 = getUIContext().get("arg1");
Object obj2 = getUIContext().get("arg2");
Object obj3 = getUIContext().get("arg3");

猜你喜欢

转载自blog.csdn.net/qq_25170493/article/details/82704443