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

TableView: support update of items that are equal, part 2

    Details

      Description

      this is related to RT-39094 (the fix is not quite complete). As suggested by Jonathan, filing a new report (c&p my part of my comments, more details over there)

      My expectation would be that a custom cell overriding isItemChanged would suffice in client code, f.i. the example in RT-22463 adding

              Callback<Person, TableRow<Person>> rowFactory = p -> {
                  return new TableRow() {
                      @Override
                      public boolean isItemChanged(Person old, Person newPerson) {
                          return old != newPerson;
                      }
                      // still needs help of skin to trigger update of child cells
                      //@Override
                      //protected Skin<?> createDefaultSkin() {
                      // return new TableRowSkinX(this);
                      //}
                  };
              };
              table.setRowFactory(rowFactory);

      after that, clicking refresh should update the table but doesn't without uncommenting the override of createDefaultSkin (for workaround skin code, see https://github.com/kleopatra/swingempire-fx/blob/master/fx8-swingempire/src/java/de/swingempire/fx/scene/control/cell/TableRowSkinX.java

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              fastegal Jeanette Winzenburg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: