|Possible bug in NatCombo using multiselect with easy fix [message #1772920]
||Mon, 18 September 2017 17:32
| Louis Detweiler
Registered: August 2017
When using a multiselect NatCombo combobox cell editor, the order that the selections are displayed is random and not consistent with the order that they are displayed in the drop down menu. This could possibly be undesirable in some use cases, for example in mine.
Through some debugging I discovered that this is because the selectionStateMap is declared as a HashMap in the setItems method, which is unordered, so it jumbles things when they are selected. However, if instead it is declared as a LinkedHashMap, it then preserves the ordering and fixes the issue.
I'm not sure if there is a different reason why the selectionStateMap is a HashMap as opposed to a LinkedHashMap or not, but if this is indeed a bug the fix is extremely simple.
Just wanted to notify you about this matter.
Powered by FUDForum
. Page generated in 0.01918 seconds