-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
Is that an error or a feature in ZK? When I use: Executions.getCurrent().sendRedirect( "/zul/page.zul" ) constructor of the window associated with page.zul and afterCompose method are called twice! But when I enter the page in "normal way" everything is fine. Is there any param that can affect this behaviour?
Regards
What do you mean? The doAfterCompose() method being called twice on the referring page, or the destination page, or one each? What problem are you experiencing?
Hi adamzk,
afterCompose() is only available in Include and Macro, but from your description it's hard to figure out where they are involved. Can you provide a simple sample that reproduce the case?
Also, what is your ZK version?
Regards,
Simon
zk. 5.0.4
Problem is:
1. Click on the button on page /zul/myPage.zul
2. In event handler method for this button is code:
getPage().invalidate();
getDesktop().invalidate();
Executions.deactivate( getDesktop() );
invalidate();
Executions.getCurrent().sendRedirect( "/zul/myPage.zul" );
3. After send redirect I can see in logs: 2010-09-23 11:46:38 org.zkoss.zk.ui.http.WebManager getDesktop:399
FINE: Create desktop for /zul/myPage.zul
2010-09-23 11:46:38 org.zkoss.zk.ui.http.WebManager getDesktop:399
FINE: Create desktop for /zul/myPage.zul
So ZK is creating two desktops after redirect!!!!!!
What the hell!! ??
Regards
Asked: 2010-09-22 05:51:35 +0800
Seen: 400 times
Last updated: Sep 23 '10