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

Wrong order for item removed from ListModelList model

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.0.2
    • Fix Version/s: 6.5.1
    • Component/s: Components
    • Labels:
    • Environment:

      Ubuntu 12.04LTS, Indigo Service Release 2, Java 1.7.0.7, Firefox 16.0.1, ZK release 6.0.2

      Description

      In the class org.zkoss.zul.ListModelList.java
      an error occurs, if in a multiple selection
      e.g. the last two entries were removed from
      the model. Error Window says: size 2 index 2
      ArrayOutOfBoundException

      Method ZK implementation:
      public E remove(int index) {
      E ret = _list.remove(index);
      removeFromSelection(ret);
      fireEvent(ListDataEvent.INTERVAL_REMOVED, index, index);
      return ret;
      }

      With our implementation it works:
      @Override
      public E remove( int index )

      { E ret = _list.get( index ); removeFromSelection( ret ); _list.remove( ret ); fireEvent( ListDataEvent.INTERVAL_REMOVED, index, index ); return ret; }

      Is this bug fixed in a higher version or still open? Thank you for your help.

      Kind regards
      Stephan

        Attachments

        1. ZKBUG.part1.rar
          9.00 MB
        2. ZKBUG.part2.rar
          7.17 MB

          Activity

            People

            • Assignee:
              vincentjian vincentjian
              Reporter:
              testuser35 testuser35
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: