In your itemRenderer, you must update a property in the dataProvider
item when the user causes the state to change, and in the overrides set
data() function, you must read this item property and set the state
accordingly.

 

Tracy

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nwebb
Sent: Sunday, February 25, 2007 8:04 AM
To: flexcoders
Subject: [flexcoders] Problem with List Item Renderer (and states)

 

Hi, 
I have a custom item renderer with two states (expanded and collapsed)
My items are displayed in a List component, and the data is currently
coming from an ArrayCollection.

You can see the page here (click on "Gig Calender"):
http://www.bathbands.co.uk/test2007/
<http://www.bathbands.co.uk/test2007/> 

Here is an example of the problem I'm facing:

1) Click the "Read More" button of the first item in the List - it will
expand. 
2) Scroll down and you can see that the third and last item have also
expanded.
3) Scroll back up and you will see that the first item is now in the
collapsed state again, but other items are now in the expanded state. 

I'm not sure what's causing the other items to open/close. I guess it
has something to do with Flex redrawing stuff as it goes off screen, and
would appreciate suggestions on how best to prevent this kind of thing
from happening. 

Cheers,
Neil 

 

Reply via email to