我制作了一个弹出窗口。
Window window = (Window)Executions.createComponents("./org.zul", null, **map**);
./org.zul有一个EditController.java这个控制器如何获取地图?谢谢
您可以使用它来打开弹出/模态窗口
Map args = new HashMap();
args.put("myMap", thisIsMyMap);
popupWin = (Window)Executions.createComponents("org.zul", null, args);
// popupWin.setClosable(true);
popupWin.doModal();
这在EditController.java
thisIsMyMap = (HashMap) Executions.getCurrent().getArg().get("myMap");
会是这样的
Map<String, Object> args = new HashMap<String, Object>();
defaultReorderSelected = new ListModelList<ReorderData>()
args.put("availableList", availableReorderList);
args.put("defaultSelected", defaultReorderSelected);
public void createReorderModal(Component comp, Map args) {
Executions.getCurrent().createComponents("/core/component/model_window_new.zul",
comp, args);
}
在model_window_new.zulafterCompose()
viewModel 的方法中,您必须编写与 Key of 中使用的名称相同的名称Map
@AfterCompose
public void doAfterCompose(@ContextParam(ContextType.VIEW) Component view,
@ExecutionArgParam("availableList") ListModelList<SortData> availableList,
@ExecutionArgParam("defaultSelected") ListModelList<SortData> defaultSelectedList){
//Your Business Logic.
}