"access to the components that get created from the ArrayCollection. Is
there a way?" Short answer, no.

 

Longer answer:  itemRenderers are recycled and only the visible renderers
even exist.  When using item renderers, any state that depends on the
item/row must be driven by the item.  You need to set up your renderer so
that when an underlying item property changes, that change causes the
rendered component's state to change.

 

You do this by overriding the set data() function and commitProperties
function.

 

Find an example of an itemRenderer and modify it rather than trying to do
this from scratch.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Baz
Sent: Wednesday, August 12, 2009 3:57 PM
To: [email protected]
Subject: [flexcoders] ItemRender - Access Specific Item at Run-time

 

  

I have a custom ItemRender that uses an ArrayCollection dataProvider.
Everything loads up and displays nicely, but I am having a heck of a time
finding out how to get at a specifc item in the list to change its state -
something like myDataContainer.ItemArray[10].state = "my_custom_state" to
get at the 10th item. Bear in mind its not the source ArrayCollection that I
need to get at, that's no problem, its access to the components that get
created from the ArrayCollection that I'm looking for. Is there a way?

Thanks very much.

 



Reply via email to