-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I have two applications with cross context because they share some resources. I need to open a modal window from App1 which .zul is in App2.
I create the window this way:
(Window)Executions.createComponents("~StsUtilidades/recursos/Utilidades/Usuarios/MaestroPerfilUsuario.zul",null,null);
But it throws an exception saying that the composer's class of the modal window cannot be found. I imagine it is searching the class in App1 (from where the .zul is called) instead of searching it in App2 (where the .zul is located).
How can I solve it??
Thank you very much!
Neus,
Your problem is that that the controller is inside the second application and you create it in your application.
You could make a kind of framework(jar) for the controllers who are shared.
Other solution can be an include and give the url from your other application.
This should be no problem as long you don't have an authentication in your other application.
Greetz chill.
Hello Neus, I think you need to put the second parameter (parent). look at this example:
dataRow.addEventListener(Events.ON_DOUBLE_CLICK, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
ContactTreeNode clickedNodeValue = (ContactTreeNode) ((Treeitem) event.getTarget().getParent())
.getValue();
Window w = new Window("ZK IM - " + ((Contact) clickedNodeValue.getData()).getName(), "normal",
true);
w.setPosition("parent");
w.setParent(demoWindow);
HashMap<String, String> dataArgs = new HashMap<String, String>();
dataArgs.put("name", clickedNodeValue.getData().getName());
Executions.createComponents("/widgets/tree/dynamic_tree/dialog.zul", w, dataArgs);
w.doOverlapped();
}
});
in this fiddle there is a simple example too: Executions-createComponents
I hope that helps you...
Asked: 2014-06-16 10:15:05 +0800
Seen: 20 times
Last updated: Jun 17 '14
what is the exception?
chillworld ( 2014-06-17 05:39:34 +0800 )editIt's a ClassNotFoundException
Neus ( 2014-06-17 07:51:26 +0800 )edit