1

Redirect modal window without changing parent window. [closed]

asked 2014-02-13 12:48:56 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

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.

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by chillworld
close date 2015-03-26 16:45:28

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-13 16:12:59 +0800

barracus gravatar image barracus flag of Italy
38 4

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.

link publish delete flag offensive edit

Comments

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

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-02-13 12:48:56 +0800

Seen: 36 times

Last updated: Feb 13 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More