Hello,
Is there a way for a SelectItem to maintain the ordering from the value map I set on it? I found that even if the value map is a LinkedHashMap, if the keys contain numbers then SmartGWT internally re-sorts it for the SelectItem based on the numeric keys instead of preserving the ordering of the LinkedHashMap. I am just calling selectItem.setValueMap(myLinkedHashMap) and I don't understand why it is re-sorting it based on the numeric keys of the map.
I don't want to use setSortField() because it looks a little ugly - I don't want the user to need to see that it has the display field's sort enabled in the header. I would just like the values to stay sorted the same way they are in the LinkedHashMap.
Also is this something you could fix on your end? If you pass a LinkedHashMap into selectItem.setValueMap(), shouldn't it preserve the ordering?
Is there a way for a SelectItem to maintain the ordering from the value map I set on it? I found that even if the value map is a LinkedHashMap, if the keys contain numbers then SmartGWT internally re-sorts it for the SelectItem based on the numeric keys instead of preserving the ordering of the LinkedHashMap. I am just calling selectItem.setValueMap(myLinkedHashMap) and I don't understand why it is re-sorting it based on the numeric keys of the map.
I don't want to use setSortField() because it looks a little ugly - I don't want the user to need to see that it has the display field's sort enabled in the header. I would just like the values to stay sorted the same way they are in the LinkedHashMap.
Also is this something you could fix on your end? If you pass a LinkedHashMap into selectItem.setValueMap(), shouldn't it preserve the ordering?
Comment