ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Integrate ZK in a html page

zeec1234
30 Nov 2011 14:32:04 GMT
30 Nov 2011 14:32:04 GMT

Hi,

How can I integrate ZK app inside already existing html page?

I mean I have a HTML page with a layout of 3 panes(DIV) and I want to maintain 2 panes in html however in 1 pane I want to launch ZK app.

Thank you in advance.
Zeec

Steva77Top Contributor
2 Dec 2011 14:27:29 GMT
2 Dec 2011 14:27:29 GMT

Mmhhhh... I would see it the other way round, i.e. have a ZK page include some native html code by mean of dedicated tags.
See for example http://books.zkoss.org/wiki/ZK_Component_Reference/Essential_Components/Html.

derepentigny
2 Dec 2011 14:48:34 GMT
2 Dec 2011 14:48:34 GMT

Or perhaps change the div for an iframe that points to the ZK app.

terrytornadoTop Contributor
2 Dec 2011 20:06:20 GMT
2 Dec 2011 20:06:20 GMT

zk needs his own rendering engine. So you must decide wich of the both described ways you will follow.

best
Stephan

PS: Hi Steva, long time since your last post. How are you?

simonmassey
5 Dec 2011 00:06:50 GMT
5 Dec 2011 00:06:50 GMT

Checkout the documentation about "native namespace". Native namespace is just regular html; only you have to make it nicely formed xhtml so that the zk xml parser can load it to find the actual zul in it. The native bits are sent to the browser just as it is.

http://www.zkoss.org/doc/devguide/ch07s17s02.html
http://books.zkoss.org/wiki/ZK_Developer's_Reference/UI_Patterns/HTML_Tags/The_XHTML_Component_Set

Once you have converted you page to well formed native namespace xml you can add any ZUL or ZHTML components into it. A zhtml component being html that you want to update via ajax.

If you took this approach you could start out by converting your page to xhtml native namespace. If you can rename it '.xml' and open it up in IE as pure XML then you have something which the ZK loader can parse. Then you just rename it .zul and start putting your ZK bits into it.

Simon