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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.2
    • Fix Version/s: 8.0.3
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.0.3 S7, ZK 8.0.3 S8

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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