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

[TextFieldTableCell] (and others) to cancel or commit edit on focus lost causes new cell to be edited

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u40
    • Component/s: javafx

      Description

      Test case attached. When using these cells (I have same problem with ChoiceBox) there is no way to trap the focus lost and cancel/commit the edit.
      - Click on a cell.
      - Click on the button to loose the focus.
      - Observe that the edited cell is no more the one that was edited.

      In the testcase I am modifying the table content on focus lost, the table becomes inconsistent. Should the table protect itself against such an inconsistent state?


      As a workaround I tried to develop my own TextFieldCell cell but to have a properly behaving cell you need to duplicate CellUtils and TextFieldTableCell code, so I have duplicated a bunch of code to plug a simple focus listener.

      These cells should expose the embedded piece of UI for customisation.
       

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              jfdenise Jean-Francois Denise (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: