-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
None
-
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Runtime: Java(TM) SE Runtime Environment 1.8.0_17-b02
Java: 1.7.0_17; Java HotSpot(TM) 64-bit Server VM 23.7-b01
ProductVersion: NetBeans IDE 7.3 (Build 201306052037)
Having issue getting one of two list views in my project from displaying/highlighting the selected index when that item is selected programatically. Please see link below for full description of issue and code segments that I placed on Stack Overflow website, where I was instructed to file an issue against the ListView here.
http://stackoverflow.com/questions/17413206/listview-not-showing-selected-item-when-selected-programatically?noredirect=1#comment25290835_17413206
EDIT: After some testing with my code, I have discovered that the issue seems to occur only when I also use the ListView.scrollTo() method. If I remove the scrollTo method from my code, the list view correctly shows and highlights the selected item. But with the scrollTo method still in the code, not only does it not highlight, but it seems to make the ListView display empty, even though System.out.println(ListView.getSelectionModel().getItems().toString()) will show that the ListView has been assigned the correct observable list.
This is rather inconvenient, however, as it means that any list I have longer than the size of my listView will not scroll down to the selected item.
http://stackoverflow.com/questions/17413206/listview-not-showing-selected-item-when-selected-programatically?noredirect=1#comment25290835_17413206
EDIT: After some testing with my code, I have discovered that the issue seems to occur only when I also use the ListView.scrollTo() method. If I remove the scrollTo method from my code, the list view correctly shows and highlights the selected item. But with the scrollTo method still in the code, not only does it not highlight, but it seems to make the ListView display empty, even though System.out.println(ListView.getSelectionModel().getItems().toString()) will show that the ListView has been assigned the correct observable list.
This is rather inconvenient, however, as it means that any list I have longer than the size of my listView will not scroll down to the selected item.