How to force call Flex ComboBox labelFunction on selected item when locale changes?

I have a ComboBox with a label function like this:

private function fieldLabelFunction(item:Object):String {
    return resourceManager.getString('dashboard',"SS." + item);
}   

      

When I change locales, the shortcuts are displayed correctly in the ComboBox dropdown, or if I change the selection. However, the currently selected item label is not updated first.

Can labelFunction be called again?

+2


source to share


1 answer


If the dataProvider is an ArrayCollection (or ListCollectionView) you can try to call refresh () on it after changing Locale.

I think this is calling the labelFunction again.

From the behavior you described, it could also be a Flex bug.



HTH

Cohen

+4


source







All Articles