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

Getting selected count from a large tree with paging causes server-side stack overflow

XMLWordPrintable

      Reproducing steps:

      1. Open the zul page
      2. Navigate to the last page
      3. Select the first row
      3. Click the "Get selected count" button

      Result:

      Java exception "java.lang.StackOverflowError" is thrown.

      Reproducing code:

      <zk>
          <button label="Get selected count">
          <attribute name="onClick"><![CDATA[
          mytree.getSelectedCount();
          ]]></attribute>
          </button>
          <zscript><![CDATA[    
          List items = Collections.nCopies(50000, "test");
          ]]></zscript>
          <tree id="mytree" mold="paging" pageSize="2">
              <treecols>
                  <treecol label="Column 1" />
              </treecols>
              <treechildren>
                  <treeitem forEach="${items}">
                      <treerow>
                          <treecell label="${forEachStatus.index}"/>
                      </treerow>
                  </treeitem>
              </treechildren>
          </tree>
      </zk>
      

            hanhsu hanhsu
            neillee neillee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: