tags:

views:

498

answers:

1

I have a ComboBox with a label function like this one:

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

When I change locales, the labels display correctly in the ComboBox's dropdown list, or if I change a selection. However, the currently selected item's label doesn't refresh at first.

Is there a way to force the labelFunction to get called again?

+2  A: 

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

I think this triggers the labelFunction to be called again.

From the behaviour you describe, this might also be a Flex bug.

hth

Koen

Koen Weyn
That worked perfectly. Thanks a lot!
Mike Sickler