Archive for January 12th, 2009

12
Jan

Flex Gumbo FXG use DataGroup instead of Repeater

Flex Gumbo SDK Iteration 10 FXG has an issue with the Repeater object the content property is not binding, I submited a ticket to Adobe here.

The code that repoduce the error is below:


   <mx:Repeater id="r" dataProvider="{ar}">
<FxButton left="20" top="335" content="{r.currentItem}" skinClass="components.Button" />
    </mx:Repeater> 

I couldn’t find any workaround and end up using the ‘DataGroup’ FXG object instead. The DataGroup allow you to do what the repeater does so I am not going to be surprised if Adobe decide to deprecate the component.


    <DataGroup>
        <layout><VerticalLayout gap="1" /></layout>
        <dataProvider>
            <ArrayCollection>
				<FxButton id="btn4" left="20" top="335" content="{arrayCollection.getItemAt(0)}"
					skinClass="components.Button" includeIn="SearchPage" />
            </ArrayCollection>
        </dataProvider>
    </DataGroup>

Or you can set the array collection as any component and attach it;


<DataGroup dataProvider="{arrayCollection}" />