How about you have an index field in your list dataProvider and call
data.index in the component.

--- In [email protected], "bmilesp" <[EMAIL PROTECTED]> wrote:
>
> i've already tried getItemIndex and failed, i suppose that i'm 
> implementing it wrong. I've attempted a number of times similar to 
> this attempt:
> 
> <mx:List dataprovider="dProvider.incrementalData">
> <mx:itemrenderer>
> <mx:component>
> <p:custom_component dataProvider="{data.element}"  
> value="{outerDocument.dataModel.dataVal[getItemIndex(this)]}">
> </mx:component>
> </mx:itemRenderer>
> </mx:list>
> 
> thie idea is this: as each component in the itemrenderer increments, 
> it will bind to the dataModel.dataVal[index] to retrieve it's value. 
> But obviously getItemIndex in this case doesn't work. Any other 
> ideas? thx in advance -b
> 
> 
> --- In [email protected], "Alex Harui" <aharui@> wrote:
> >
> > You can call getItemIndex if you want
> > 
> >  
> > 
> > ________________________________
> > 
> > From: [email protected] 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of bmilesp
> > Sent: Tuesday, December 18, 2007 7:18 PM
> > To: [email protected]
> > Subject: [flexcoders] itemrenderer dataprovider index?
> > 
> >  
> > 
> > greetings!
> > 
> > I have an mx:List with an itemrenderer that renders a custom 
> > component using a dataprovider. i want to get the rendered item 
> index 
> > (or current dataprovider index?) of each custom component in the 
> > list. 
> > 
> > or even just an incrementing number inside of the component would 
> > work. 
> > 
> > so I wish to write something like: 
> > 
> > <p:custom_component dataProvider="{data}" 
> > value="{outerDocument.dataModel.dataVal[i]}">
> > 
> > "i" being the current index of the rendered item
> > 
> > Any Clues? thanks everyone!
> >
>


Reply via email to