Validate cell, or request a cell update

Werner Lehmann lehmann at
Tue Jul 9 03:17:29 PDT 2013


Jonathan's question about Cell.updateItem rang a bell. Earlier this year 
I used a listview with a cell factory and had to resort to a dirty trick 
to get individual items to update in the SG if the underlying data had 
changed. I am hoping for a non-dirty solution - otherwise I might create 
an improvement ticket.

In this usecase, the listview items show a status icon, e.g. a checkmark 
or warning icon. Now, if that state changes there does not seem to be a 
way to ask the listview to update the visuals of a particular item in 
the listview. I ended up keeping weakreferences of all cells when they 
are created in (my) factory, and then using cell.validationStateChanged 
on each of the cells, in hopes that we don't have many cells and that 
one of them would represent the item in the SG.

The main problem here is that listview has no means to request an update 
of individual items, and references to cells are not available publicly 
(which is ok).

Would this be related to the current "node validation" thread? I.e., 
revalidate the whole listview to have one icon replaced in one item...


More information about the openjfx-dev mailing list