Good thinking. I was to much in mine head with the sendRedirect. Thx for the answer
chillworld ( 2014-02-14 10:21:03 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Oke we all know how to create a modal window like this :
Window window = (Window)Executions.createComponents("some.zul", null, null);
window.setClosable(true);
window.doModal();
No problem here. But now I want to redirect the some.zul to other.zul. This is of course the VM of some.zul who will decide if a redirection is needed
So in the vm I did try the following 3 things (one in a time of course):
Executions.sendRedirect("other.zul");
Executions.getCurrent().sendRedirect("other.zul");
Executions.getCurrent().sendRedirect("other.zul","_self");
Now the modal window is showing the correct content but mine main window is gone.
Anybody has an idea how to do this in a clean zk way (so without Iframe)?
Greetz chill.
My idea is to use
<window apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('vmOfModalWin')">
<include src="@load(vm.mypage)" />
</window>
in the zul of modal window, and manage mypage in the vmOfModalWin.
Instead of using redirect, you can change the mypage and notify the change to the view.
I don't know if it is the more clear mode possible, but i figure it has to work.
Good thinking. I was to much in mine head with the sendRedirect. Thx for the answer
chillworld ( 2014-02-14 10:21:03 +0800 )editAsked: 2014-02-13 12:48:56 +0800
Seen: 39 times
Last updated: Feb 13 '14
Is there a way to resolve view model properties as input to client side javascripts?
How to Call Child ViewModel Method from Parent Window? [closed]
zk mvvm focus textbox after a button clicked
ZK MVVM Listbox Mold Paging - select first record on each page [closed]