Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8094837

TableView weird behavior, invalid items shown after list update

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P4 P4
    • None
    • 8
    • javafx
    • MacOSX10.9.2 ,8.0.0-b132

      When changing the ObservableList of a TableView the GUI shows under certain circumstances invalid items

      Imprtant code:
      TableView<FileOverviewFile> FileTable
      InvalidationListener listener = new InvalidationListener(){

                  @Override
                  public void invalidated(Observable o) {
                      if (files != null){
                      FileTable.getItems().clear();
                      FileTable.getItems().addAll(MainModel.getInstance().files.filtered((FileOverviewFile file)
                              -> (dateFrom.get().atStartOfDay().isBefore(file.date.get()) && dateTo.get().atTime(23, 59, 59).isAfter(file.date.get()) && file.toString().contains(filter.get()))
                      ));
                      }
                  }
                  
              };
      filter.addListener(listener);

      In my test case i start with 3 items. I then change the filter so that it returns 0 items.
      After changing back the settings, so that the same 3 items were returned as in the beggining, the FileTable GUI shows an invalid 4th items, a partly copy of the last item in the List.

      When resizing the TableView, so that the invalid entries were outside the visible area, the invalid items are not shown anymore.

      Every time i repeat these steps, one more invalid item is shown.

      Screenshots:
      1) https://mail.srm.de/webdav/ticket/eJw9jEEKwzAMBF9T3eJKsmTHB13zgbzAGCUNLWlJ8n,qXgoLy.zArhazomItFTHBYtP28hOaTXD.VUFUOGxgkixjVGVwg81ERkqujWta7nM73Pcb4,x4X70YSQbsoQ71t1AMUgLn8NlXeBprzv2eU,oC5k0hWQ__/Screen%20Shot%202014-04-01%20at%2013.49.27.png
      2) https://mail.srm.de/webdav/ticket/eJw9iUEKwzAMBF9T3eLKsmTHB13zgbxAGDUNLWlJ.n,qXAILw8wumoqgoFVDzPDQaX37AU0nOK6rIgrsOlDkwmMSIXCFVZnHmF1as.z3ue3u241wfn5.HYSRB.yLXewsMQWuIUn4bgu8tFhGl0JCf,UYIeg_/Screen%20Shot%202014-04-01%20at%2013.49.35.png
      3) https://mail.srm.de/webdav/ticket/eJw9iUsOwjAMBU.Dd03txE6ahbe9QE9g0vQjUEEt9xdhg,Sk0cxbNSRBQcuGGGHRcX,WC4qOcP2vjChwaueJEw9BxENV2JV5oFilRItzP5Wz1uPmcdpenwaPxB22URP7FQqOs.Pg3scKDzUyWubI6f4F7AQiQg__/Screen%20Shot%202014-04-01%20at%2013.49.43.png
      4) https://mail.srm.de/webdav/ticket/eJw9iUEOgzAMBF9T30htx07IwVc.wAvSNFDUiiLg,yK9VFppNLOz.aiomFNGDDDZsHzqAcUGOP5XQlTYrWOSKL1XZagGi4n0FKqWKYdyH8te63pjHF,fs4GRpMM2apJ,hbyT5BTdts7wtkhP5EeOgS,1UiIO/Screen%20Shot%202014-04-01%20at%2013.49.50.png
      5) https://mail.srm.de/webdav/ticket/eJw9iUsOgzAMBU9T70jtxM5n4S0X4AQhMhS1ohVwfzXdVHrSaOatGpKgYC0VMcKi4,ayE5qOcP6vgihw6OCJE.cg4sEUNmXOFE3aUuN8n9phtt88To,31eGReMA.6lJ,hYLj4kTcZ1,hqVR8mslSti,0jiIh/Screen%20Shot%202014-04-01%20at%2013.49.55.png

            jgiles Jonathan Giles
            usengewaljfx Uwe Sengewald (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: