Revision history [back]

click to hide/show revision 1
initial version

answered 2016-11-25 02:18:44 +0800

cor3000 gravatar image cor3000

ZK Team

In principle you cannot access components directly inside an iframe as they belong to another desktop and you need to communicate via event queues as described here: https://www.zkoss.org/wiki/ZKComponentReference/EssentialComponents/Iframe#RetrievingComponentinsideIframe

Since there are many "windows" in your description it's hard to give you the answer you need. In order to help you I'd like to ask you to provide a simplified running example. e.g. on http://zkfiddle.org/ Also please explain what you mean by "bind code"? I assume this will become obvious in your example.

Robert

At first I'd suggest to reconsider the usage of an iframe. If not necessary you can avoid this extra complexity. As I understand both your parent and child frame are part of the same application <include src="childPage.zul"/> sounds fair enough.

However if there's an strong need for an <iframe>: In principle you cannot access components directly inside an iframe as they belong to another desktop and you need to communicate via event queues as described here: https://www.zkoss.org/wiki/ZKComponentReference/EssentialComponents/Iframe#RetrievingComponentinsideIframeIframe. If not using ZK EE you'll have to enable server push in the iframe in order to access and update components from another thread.

Since there are many "windows" in your description it's hard to give you the answer you need. In order to help you I'd like to ask you to provide a simplified running example. e.g. on http://zkfiddle.org/ Also please explain what you mean by "bind code"? I assume this will become obvious in your example.

Robert

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