12
Jan
09

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}" />

2 Responses to “Flex Gumbo FXG use DataGroup instead of Repeater”


  1. 1 judah Oct 23rd, 2009 at 12:23 pm

    I have received the same error message and have decided to convert to DataGroup. In my repeater I was able to pass in XML. In the DataGroup it does not appear to support it.

    TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@505bb7e9 to mx.collections.IList.

    If this is true what options do I have? Thanks

    Judah

  2. 2 judah Oct 23rd, 2009 at 7:10 pm

    I found a solution in converting the XMLList into an XMLListCollection:

    dataProvider=”{new XMLListCollection(XMLList(myXML))}”