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

Uncessary onRender command triggered when setting tabbox's maximalHeight attribute to true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.6
    • 7.0.5
    • None
    • Security Level: Jimmy
    • None
    • ZK 7.0.7
    • None

      Reproducible sample:

      <zk>
          <zscript><![CDATA[
          ListModelList model = new ListModelList();
          void create(Component comp) {
              Events.echoEvent("onLoad", comp, null);
          }
          void load(Component comp) {
              org.zkoss.lang.Threads.sleep(1000);
              for (int i = 0; i < 1000; i++) {
                  model.add("item " + i);
              }
          }
          ]]></zscript>
          <tabbox maximalHeight="true">
              <tabs>
                  <tab id="tab1" label="1" />
                  <tab id="tab2" label="2" />
              </tabs>
              <tabpanels>
                  <tabpanel>
                      Details 1
                      <separator />
                      Details 1
                      <separator />
                      Details 1
                      <separator />
                      Details 1
                      <separator />
                      Details 1
                      <separator />
                  </tabpanel>
                  <tabpanel onCreate="create(self)" onLoad="load(self)">
                      <grid id="details2" vflex="1" model="${model}">
                          <custom-attributes org.zkoss.zul.grid.rod="false" />
                      </grid>
                  </tabpanel>
              </tabpanels>
          </tabbox>
      </zk>
      

      Debug information:
      MeshWidget._onRender() function will add items when the body height is 0.

            DevChu DevChu
            vincentjian vincentjian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h