JDK-8274065 : Tree-/TableRowSkin: must sync itself to state of row
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: jfx17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-09-21
  • Updated: 2025-02-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
the skins listen to changes of row's table but fail to update internal state as needed, in particular 

- don't handle changes to tableProperty 
- incorrect assumption of row's parent hierarchy

Code in Question:
- TableRowSkin constructor: registerChangeListener(control.tableViewProperty(), e -> { ... }) does sync only some properties to a changed TableView (not all of them, e.g. the VirtualFlow is not
- TreeTableRowSkin does not have this listener at all, same problem otherwise

Both 'fetch' the VirtualFlow, by making the assumption that it must be somewhere in the hierarchy. Therefore, a getParent() loop is used to find it.
This is not the case for Unit Tests (That is why we have a Nullpointer check there). It should not happen in real life scenarios though, but still not so nice as API design.

Goal:
- table changed listener need to synchronize the state for the cells and the flow, +treeColumn in case of the TreeTableView.
- The VirtualFlow need to be retrieved in another way. I have no idea how to that in a nice way as of now.