actionscript 3 - How to refresh itemrenderer in flex -
i have developed flex application contains itemrenderer displays list of items. problem if select item background gets highlighted , if go page , come same page again, item had selected before still highlighted. there solution can refresh itemrenderer clear highlighted background every time when open page?
so sounds when "go page , come back" you're navigating other screen in app , returning screen has list. item says selected because view being re-used. it's not new view being created scratch...
to remove selection list, can set selectedindex of list -1, or perhaps set selecteditem of list null
(or perhaps undefined
docs state). can either of these things right before navigate next screen, or when navigate list.
there's few more ways solve this:
- don't re-use view
- reset dataprovider on list when navigate back
- etc...
but setting selectedindex
or selecteditem
efficient method.
Comments
Post a Comment