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

tree with model template loses selection state

XMLWordPrintable

    • None

      Steps to Reproduce

      <zk>
          <zscript><![CDATA[
              DefaultTreeNode root = new DefaultTreeNode("root", new DefaultTreeNode[] {
                  new DefaultTreeNode("item-1", new DefaultTreeNode[] {
                      new DefaultTreeNode("item-1.1"), new DefaultTreeNode("item-1.2"), new DefaultTreeNode("item-1.3")
                  }),
                  new DefaultTreeNode("item-2", new DefaultTreeNode[] {
                      new DefaultTreeNode("item-2.1"), new DefaultTreeNode("item-2.2"), new DefaultTreeNode("item-2.3")
                  }),
                  new DefaultTreeNode("item-3", new DefaultTreeNode[] {
                      new DefaultTreeNode("item-3.1"), new DefaultTreeNode("item-3.2"), new DefaultTreeNode("item-3.3")
                  })
              });
              DefaultTreeModel model = new DefaultTreeModel(root);
              model.addOpenObject(root.getChildAt(0));
              model.addOpenObject(root.getChildAt(1));
              model.addOpenObject(root.getChildAt(2));
              model.setMultiple(true);
              model.setPageSize(5);
          ]]></zscript>
          <tree model="${model}" checkmark="true" mold="paging">
              <treecols>
                  <treecol label="col1"></treecol>
              </treecols>
              <template name="model">
                  <treeitem label="${each.data}"/>
              </template>
          </tree>
      </zk>
      

      1) select one or more leaf node(s) ... or check "select all"
      2) switch to next page
      3) switch back to first page

      Current Result

      selection checkmark is missing for some tree nodes

      Expected Result

      selection checkmark remains as checked

      Debug Information

      doesn't happen when removing/comment out the model template

      Workaround

            jumperchen jumperchen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: