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

Wrong order for item removed from ListModelList model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.1
    • 6.0.2
    • Components
    • Ubuntu 12.04LTS, Indigo Service Release 2, Java 1.7.0.7, Firefox 16.0.1, ZK release 6.0.2

    • None

      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

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

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

              Created:
              Updated:
              Resolved: