-
Bug
-
Resolution: Fixed
-
P3
-
8
-
win7 java 8 b89
Under certain circumstances, when you remove an item from the list the selected item is not correctly highlighted with a selection bar even though the underlying selection model knows that an item is selected.
This forum thread: https://forums.oracle.com/forums/thread.jspa?threadID=2534956 "Selection change event not fired" is related to this issue.
To reproduce:
1. Run the supplied sample code.
2. Select the first item in the list (apples).
3. Press the "Remove Selected" button.
4. App will display => "Removed apples", "Selection changed from 'apples' to 'oranges'"
5. Even though oranges are selected, there is no selection bar displayed for that item in the ListView.
To see how the selection bar should behave:
1. Press the "Reset List" button.
2. Click on the second item in the list (oranges).
3. Press the "Remove Selected" button.
4. App will display => "Removed oranges", "Selection changed from 'oranges' to 'peaches'"
5. Peaches are selected and there is a gray selection bar displayed for that item in the ListView.
So the behaviour is different depending on whether you are manipulating the first item in the list or subsequent items.
This forum thread: https://forums.oracle.com/forums/thread.jspa?threadID=2534956 "Selection change event not fired" is related to this issue.
To reproduce:
1. Run the supplied sample code.
2. Select the first item in the list (apples).
3. Press the "Remove Selected" button.
4. App will display => "Removed apples", "Selection changed from 'apples' to 'oranges'"
5. Even though oranges are selected, there is no selection bar displayed for that item in the ListView.
To see how the selection bar should behave:
1. Press the "Reset List" button.
2. Click on the second item in the list (oranges).
3. Press the "Remove Selected" button.
4. App will display => "Removed oranges", "Selection changed from 'oranges' to 'peaches'"
5. Peaches are selected and there is a gray selection bar displayed for that item in the ListView.
So the behaviour is different depending on whether you are manipulating the first item in the list or subsequent items.
- is blocked by
-
JDK-8091387 Virtualised controls lack flexibility over what happens when a selected cell is removed
-
- Open
-