-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Its posible get the html code of .zul from .java?
Something like this:
<borderlayout> <north> <textbox value="actualValueInZul"></textbox> </north> </borderlayout>
Regards,
Mark.
If you are talking about the Component than Yes you can get it See how you can get Intbox value through Java code. http://zkframeworkhint.blogspot.in/2012/09/how-to-get-intbox-value-from-inside.html
Install firebug in firefox and then you can check the how ZK Engine creating the HTML Code
Sorry, I explain me better.
I want get all code of page in html, export this code and then reproduce it in other page. I think that if I can get it i will have a snapshot from page (with elements and their values).
I'm trying it because Its imposible get a snapshot from client side.
There are any way to do it?
Regards,
Mark
@khcyt
Thanks for link! I reproduce the code:
<zk> <script type="text/javascript"> function getHtml(id) { var node = jq('#'+id)[0], div = document.createElement('div'), $tmp = jq('$tmp'), tmp = $tmp[0]; div.appendChild(node.cloneNode(true)); $tmp.focus(); tmp.value = div.innerHTML; $tmp.blur(); tmp.value = ''; } </script> <window id="win" title="test win" ></window> <textbox id="tmp" onChange="System.out.println(event.getValue());" visible="false" ></textbox> <button label="show window html in console"> <attribute name="onClick"> Clients.evalJavaScript("getHtml('"+win.getUuid()+"');"); </attribute> </button> </zk>
But doesn't work for me. I expect clone the html page with values in inputs (<input id="in" style="..." value="something"/>), and this method only returns the html and zk structures.
Think in it as a snapshot. Get all code to clone a page doing copy/paste this string in a .zul page.
Anyway, if someone knows how get a snapshot from client side, will help me a lot.
Regards,
Mark
Asked: 2012-11-20 16:48:39 +0800
Seen: 107 times
Last updated: Nov 21 '12