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

Updating a treeitem in a large tree with paging causes client-side stack overflow

XMLWordPrintable

      Reproducing steps:

      1. Open the page
      2. Navigate to the last page
      3. Click the "Simulate content changed" button in the first row

      Result:

      Javascript error "Failed to mount: Maximum call stack size exceeded" occurred.

      Reproducing code:

      <zk>
          <zscript><![CDATA[
          List items = Collections.nCopies(50000, "test");
          ]]></zscript>
          <tree mold="paging" pageSize="2">
              <treecols>
                  <treecol label="Column 1" />
                  <treecol label="Column 2" />
              </treecols>
              <treechildren>
                  <treeitem forEach="${items}">
                      <treerow>
                          <treecell label="${forEachStatus.index}"/>
                          <treecell>
                              <button label="Simulate content changed">
                              <attribute name="onClick"><![CDATA[
                              Treerow row = (Treerow) self.parent.parent;
                              Treeitem item = row.getParent();
                              row.detach();
                              item.appendChild(row);
                              ]]></attribute>
                              </button>
                          </treecell>
                      </treerow>
                  </treeitem>
              </treechildren>
          </tree>
      </zk>
      

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

              Created:
              Updated:
              Resolved: