-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a sample.zul file that contains just a window with its set of components (without ids except for the window having ID="test".
I have an index.zul file with just a button. I want to make it so that when I click on a button, pops up the window in the index.zul via include. When I click on the button again, another sample.zul should be included with the same window (programatically changing the id to be different maybe?).
How would I do this?
The reason behind this is so that I can essentially have a window template (sample.zul) and just be able to create multiple instances of sample.zul in the same index.zul page if the user clicks the button.
I was thinking something along the lines of:
<div="testdiv">
<button label="Spawn Window" sclass="blue"/>
<attribute name="onClick">
Include newtest = new Include();
ni.setSrc("sample.zul");
testdiv.appendChild(newtest);
</attribute>
</div>
It doesn't do anything though. Perhaps the id of the window in sample.zul is the same, which causes conflict? Im not sure...
Hello, Tessla
There are some example.
http://www.zkoss.org/smalltalks/zk3.5.2/
Thank you.
Asked: 2010-10-08 16:32:09 +0800
Seen: 538 times
Last updated: Oct 18 '10