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

ListModelList in grid with ROD and AutoSort cause unexpected "Adding causes a smaller list?" UIException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.3
    • 8.0.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S7, ZK 8.0.3 S8

      steps to reproduce

      http://zkfiddle.org/sample/3rnm1e1/1-Grid-ROD-Autosort-LiveGridDataLoader-Exception
      -run fiddle
      -press the button

      actual result

      A UIException is thrown :
      org.zkoss.zk.ui.UiException: Removal causes a larger list?
      at org.zkoss.zkmax.zul.impl.LiveGridDataLoader.doLiveListDataChange(LiveGridDataLoader.java:119)

      expected result

      The listmodel is cleared, then 2 items are added, then the first item is removed.
      This happen if deactivating one of the ROD or AutoSort attribute.

      root cause

      It seem that with ROD and AutoSort, the _oldTotalSize field of LiveGridDataLoader is not updated when adding items throught ListModelList.add, addAll, etc

            DevChu DevChu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h