org.zkoss.zk.ui.UiException: You cannot access components belong to other desktop

asked 2019-05-22 15:16:56 +0800

wangyingzhi gravatar image wangyingzhi

org.zkoss.zk.ui.UiException: You cannot access components belong to other desktop

delete flag offensive retag edit

2 Replies

Sort by » oldest newest

answered 2019-05-23 11:34:53 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9

updated 2019-05-23 11:36:08 +0800

The error is very clear. You are accesingen component from another desktop scope. How did you do that?

link publish delete flag offensive edit

answered 2019-05-23 11:53:28 +0800

hawk gravatar image hawk
2785 1 5
http://hawkphoenix.blogsp... ZK Team

You could see such error when you call setPageBefore(), setParent(), or insertBefore(). Simply put, you can't move a component of a desktop to another desktop.

Each desktop maps to a browser tab, and each ZK java component attached to a desktop has a corresponding javascript widget in a browser tab. The component and widget co-existed together and are bound to each other. So ZK don't allow to move a component from one desktop to another.

If you need to dynamically create a component, you can

Button button = new Button("button"); button.setPage(page);

If this doesn't answer your question, please description your question or requirement in more details.

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

1 follower



Asked: 2019-05-22 15:16:56 +0800

Seen: 9 times

Last updated: May 23 '19

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