-
Bug
-
Resolution: Fixed
-
Normal
-
5.0.7.1
-
Security Level: Jimmy
-
None
-
None
<zk>
<zscript><![CDATA[
import java.io.*;
int cnt = 0;
]]></zscript>
<vlayout id="vb">
<panel id="panel">
<panelchildren>
<button label="is the same panelchildren?">
<attribute name="onClick"><![CDATA[
Component pl = self.getParent().getParent().getPanelchildren();
alert(pl ", "(pl == self.parent));
]]></attribute>
</button>
</panelchildren>
</panel>
<button label="Clone div by Serialization">
<attribute name="onClick"><![CDATA[
ByteArrayOutputStream boa = new ByteArrayOutputStream();
new ObjectOutputStream(boa).writeObject(panel);
byte[] bs = boa.toByteArray();
Object l = new ObjectInputStream(new ByteArrayInputStream(bs)).readObject();
l.setId("dst" + ++cnt);
vb.insertBefore(l, self);
vb.insertBefore(new Label(bs.length+" bytes copied"), self);
]]></attribute>
</button>
</vlayout>
</zk>