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

Replacing Columns of a Grid with frozen column when switching page causes JS error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.2
    • 7.0.1
    • Components
    • Security Level: Jimmy
    • None
    • Chrome 34

      Reproducing Steps:

      1. run with attached zul and composer
      2. scroll the bar to the right
      3. switch to next page

      Actual:

      An JS error is showed.
      無法處理:
      setAttr
      Cannot read property 'cells' of undefined (TypeError)

      JS stack trace:

      Uncaught TypeError: Cannot read property 'cells' of undefined zul.mesh.wpd:3230
      zul.mesh.Frozen.zk.$extends._doScrollNow zul.mesh.wpd:3230
      zul.grid.Grid.zk.$extends.refreshBar_ zul.grid.wpd:382
      zk.override.setResetDataLoader zk.wpd:28279
      zk.copy._set2 zk.wpd:10268
      zk.Widget.zk.$extends.set zk.wpd:15373
      zAu.cmd1.setAttr zk.wpd:19963
      doProcess zk.wpd:19032
      doCmdsNow zk.wpd:19273
      zAu._doCmds zk.wpd:19513
      afterResponse zk.wpd:19164
      onResponseReady
      

      Expected:

      switch to next page and no JS error shows.



      Workaround:

      Set the property below and this issue doesn't appear.

      <library-property>
          <name>org.zkoss.zul.nativebar</name>
          <value>true</value>
      </library-property>
      


      Customer's Comment

      Customer said: "code for columns creation in paging() of PagingComposer.java was redundant code and it didn't necessary to business logic". That means creating Columns when onPaging event happens is not their real requirement. After the user remove those codes, the issue disappear.

        1. scrollGrid.png
          scrollGrid.png
          5 kB
        2. pagingGridIssue.zul
          0.8 kB
        3. PagingComposer.java
          2 kB
        4. jsError.png
          jsError.png
          7 kB

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: