arrays and repeaters in Flex 1.5
So a hard lesson learned in Flex last week. We have two seperate tags in some custom components that are fed by Arrays of objects. User interaction triggers adding/deleting objects in these arrays. Of course this does not tell the repeater to redraw itself. Originally I had coded use of
repeater.executeBindings()
and things appeared kosher. After a bit of testing strange things would happen with the UI display. Stuff like missing text, etc. We spent a week tag-teaming on it, then finally contacted our Gold Support rep. About 15 minutes into a Breezo, bamm! Doh! Somehow I mssed the fact that the Array class extends te DataProvider class. So, instead of
Array.push(object)
use
Array.addItem(object)
addItem() does a push() and then fires off all needed events to redraw the repeater. Voila!




