java.lang.IllegalStateException: Change current page to another desktop?

asked 2012-04-05 13:46:40 +0800

dis gravatar image dis flag of Switzerland
140 4


Sometimes we get the following exception:

java.lang.IllegalStateException: Change current page to another desktop? [Page cJnZ_]
at org.zkoss.zk.ui.impl.AbstractExecution.setCurrentPage(AbstractExecution.java:174)
at org.zkoss.zk.ui.impl.UiEngineImpl.createComponents(UiEngineImpl.java:933)
at org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:237)
at org.zkoss.zk.ui.Executions.createComponents(Executions.java:178)
at syslink.xangui.zk.XExecutions.createComponents(XExecutions.java:80)
at syslink.xangui.zk.XExecutions.createComponents2(XExecutions.java:49)
at syslink.xangui.zk.main.XanguiMain.showPanel2(XanguiMain.java:714)
at syslink.xangui.zk.oldxangui.OpenOldXangui1Action.execute(OpenOldXangui1Action.java:18)
at syslink.xangui.zk.main.XanguiMain.showPanel(XanguiMain.java:782)
at syslink.xangui.zk.main.XanguiMain$MenuEventListener.onEvent(XanguiMain.java:82)
at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:192)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1626)
at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1410)
at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1134)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:562)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:457)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:465)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

After refreshing the browser (F5) the exception is not thrown anymore.

Does anybody know what is the reason of this exception and how we can avoid it? The error message 'Change current page to another desktop' indicates that a page is moved to another desktop. But we do not intentionally move pages to other desktops.

Thank you

- Dieter

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-04-16 02:18:02 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Did you cache the parent component when calling createComponents?

The exception complains the desktop associated to the parent component is not the same to the desktop associated with the execution(i.e. the desktop associated with the target component of the trigger event)

link publish delete flag offensive edit

answered 2012-04-17 05:52:22 +0800

dis gravatar image dis flag of Switzerland
140 4

I have a tabbox where I dynamically add tabs. The zul part is very easy:

	<tabbox id="centertab" vflex="1">
		<tabs id="tabheader"/>
		<tabpanels id="tabpanel"/>

The 'tabheader' and 'tabpanel' components are cached/referenced in the corresponding composer. Snippet from composer:

	private Tabs tabheader;
	private Tabpanels tabpanel;

When a user executes an action, a new tab (zul page) is added to the tabbox. I add the zul page to the tab like this:

	// create a container
  Div container = new Div();
  // set the current page in container
  // create the components of the zul page
  Executions.createComponents("zulpage.zul", container, null);		// -> here it fails sometimes

	// add container to tabs

As mentioned above, this works in 99% perfectly. When it fails, browser refresh helps and we can continue to work.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2012-04-05 13:46:40 +0800

Seen: 241 times

Last updated: Apr 17 '12

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