RT-24371 or just a documentation issue?

Jonathan Giles jonathan.giles at oracle.com
Thu Feb 13 12:53:45 PST 2014


>From looking at your code snippet I would expect only the first item to
be removed. However, from running your code it appears that all items
are removed from the items list, clearing out the list. This does not
appear to be exactly RT-24371, and should be a new bug report.

I hope I've interpreted your email correctly - it was a little succinct
for this early in the morning :-)

-- Jonathan

On 14/02/2014 9:40 a.m., Scott Palmer wrote:
>  // How NOT to do this
> private void removeSelectedListItemsBAD(ListView list) {
> list.getItems().removeAll(list.getSelectionModel().getSelectedItems());
> list.getSelectionModel().clearSelection();
> }
> Can you spot the flaw?
> Hint... Try it on a list, but only select the first item.
> Related issue: RT-24371
> Scott

More information about the openjfx-dev mailing list