I have a MXML application with a DataGroup as follows:
<s:DataGroup id="productSelector"
dataProvider="{products}"
itemRenderer="renderers.ProductLineupRenderer"
>
<s:layout>
<s:HorizontalLayout/>
</s:layout>
</s:DataGroup>
I want to know when items in my itemRenderer are manipulated. I have the itemRenderer class dispatch custom events.
What I used to do is use a mx:repeater:
<mx:Repeater id="r" dataProvider="{configuration.products}">
<components:ProductEncapsulationView
product="{r.currentItem}"
highlightProduct="highlightProduct( event.selectedProduct )"
unhighlightProduct="clearHighlight()"
selectProduct="makeProductSelection( event.selectedProduct )"
</mx:Repeater>
where I can easily assign events coming from the itemRenderer class into the current view aggregation component. (highlightProduct, unhighlightProduct, selectProduct)
I am unsure of how to do this within a DataGroup or even a List component. But I would like to use DataGroups layouts and other great stuff you get with the spark framework.