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

setMold("paging") causes exception while checkbox is selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.8
    • Fix Version/s: 9.6.0
    • Component/s: None
    • Labels:

      Description

      Steps to Reproduce

      1. select checkbox.
      2. click paging button.
      <zk>
      <button label="paging">
         <attribute name="onClick">
            tree1.setMold("paging");
            tree2.setMold("paging");
            tree1.setPageSize(1);
            tree2.setPageSize(1);
         </attribute>
      </button>
      <hlayout>
         <tree id="tree1" multiple="true" checkmark="true" height="300px" width="200px">
            <treecols>
               <treecol label="tree1"/>
            </treecols>
         </tree>
         <tree id="tree2" multiple="true" checkmark="true" height="300px" width="200px">
            <treecols>
               <treecol label = "tree2"/>
            </treecols>
            <treechildren id="tc2">
               <treeitem>
                  <treerow>
                     <treecell label="1"/>
                  </treerow>
               </treeitem>
               <treeitem open="false" id="ti3">
                  <treerow>
                     <treecell label="2"/>
                  </treerow>
               </treeitem>
            </treechildren>
         </tree>
      </hlayout>
      <zscript><![CDATA[
            List treeNodes1 = new LinkedList();
            for (int i = 1; i < 3; ++i) {
               treeNodes1.add(new DefaultTreeNode(i, new DefaultTreeNode[]{new DefaultTreeNode(i + "-1")}));
            }
            DefaultTreeNode root1 = new DefaultTreeNode("", treeNodes1);
            DefaultTreeModel treeModel1 = new DefaultTreeModel(root1);
            tree1.setModel(treeModel1);
            treeModel1.setMultiple(true);
         ]]></zscript>
      </zk>
      

       

      Current Result

      Exception

      Failed to mount: Cannot read property 'getPageSize' of undefined.

      Expected Result

      no error

      Debug Information

      Error only happened while setMold is trigger by server side.

      Workaround

      <tree id="tree1" multiple="true" checkmark="true" mold="paging">

       

        Attachments

          Activity

            People

            Assignee:
            Leon03 Leon03
            Reporter:
            katherinelin katherinelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: