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

TableView does not sort records when setCellFactory used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: fx2.1
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Environment:

      Windows XP SP3 32-bit, JDK 7u3, JavaFX 2.1 and JavaFX 2.0.3

      Description

      In an object of class derived from TableView<MyRecord, String> I am binding columns to data via setCellFactory(). When my form appears on screen with all data fetched and I click any column in the table header to perform sort by that column, nothing happens. I added ListChangeListener object for getSortOrder() property, but it does not work when I click the same column to change sort order type, because there is no column added to / removed from the sort order list.

      Is this a known issue? Do you have any simple working example of a TableView with columns bound to data via setCellFactory(), which can be sorted by any column by mouse clicks?

      Please note, that if I bind data via setCellValueFactory(), everything works as expected. But in this case I am unable to align columns.

      Thank you.

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            aiurovetsjfx Alexander Iurovetski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: