Details
-
New Feature
-
Resolution: Unresolved
-
Normal
-
None
-
5.0.7.1
-
None
-
None
Description
Sometimes a developer can face the problem of accessing a component that belongs to a different desktop, for example when using spring to instantiate controllers but using incorret scopes for them.
For simple scenarios probably it is easier to tell what the offending component being (re)used is but in more complex scenarios it could not be obvious at first.
It would be advisable to show the component ID and possibly the desktop it belongs to in the exception message rather than just the static text:
You cannot access components belong to other desktop
See sample stack trace below.
30/08/2011 2:55:49 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet zkLoader threw exception
org.zkoss.zk.ui.UiException: You cannot access components belong to other desktop
at org.zkoss.zk.ui.AbstractComponent.checkDetach(AbstractComponent.java:465)
at org.zkoss.zk.ui.AbstractComponent.checkParentChild(AbstractComponent.java:1076)
at org.zkoss.zk.ui.AbstractComponent.setParent(AbstractComponent.java:968)
at org.zkoss.zk.ui.AbstractComponent.detach(AbstractComponent.java:1592)
at org.zkoss.zul.impl.GridDataLoader.syncModel(GridDataLoader.java:290)
at org.zkoss.zul.Grid.setModel(Grid.java:720)
at au.csiro.etools.monitor.ui.MonitorDashboardController.doAfterCompose(MonitorDashboardController.java:104)