Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-261

Panelchildren fail to serialize in Panel

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.7.1
    • Fix Version/s: 5.0.8
    • Component/s: Clustering
    • Security Level: Jimmy
    • Labels:
      None

      Description

      <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>

        Activity

        Hide
        SimonPai SimonPai added a comment -

        Fixed since 2011/8/2.

        Show
        SimonPai SimonPai added a comment - Fixed since 2011/8/2.

          People

          • Assignee:
            SimonPai SimonPai
            Reporter:
            jimmyshiau jimmyshiau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: