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

Multiple TableCell instances existing for single cell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u10
    • Fix Version/s: 8
    • Component/s: javafx

      Description

      When a new TableCell instance is created by TableView for a given cell, the previous TableCell instance for that cell will continue to respond to edits (i.e. startEdit() gets called when you double-click on that cell) until it is finally eaten by the garbage collector. New TableCell instances seem to be created when a TableView's item list is added to or when it is swapped out.

      This becomes a problem when custom TableCell subclasses are used. I have a custom TableCell class that shows a dialog window after startEdit is called... when multiple TableCell instances exist for a cell, I get multiple dialog windows appearing in succession. The more I edit the item list of the TableView, the more dialogs I get when I try to edit a cell!

      Bottom line: when a TableCell is replaced, it should no longer respond to editing in the TableView.

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            eheumannjfx Eric Heumann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: