Oleg, I cant associate the state with the data, and I cant find any info about itemRendereFunction. Do you have any link about it? According to my code, I would think this just should happen.
I re write down my code: <mx:CheckBox click="seleccionar(event)" selected="{seleccionado()}" > <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import gestion.vo.ComunidadVO; import gestion.model.GestionModelLocator; public function seleccionar(event:MouseEvent):void{ var locaciones:ArrayCollection=GestionModelLocator.getInstance().locacionesRemotasSeleccionadas; if (this.selected==true){ locaciones.addItem(data); }else{ var index:int=locaciones.getItemIndex(data); locaciones.removeItemAt(index); } } public function seleccionado():Boolean{ return GestionModelLocator.getInstance().locacionesRemotasSeleccionadas.contains(data); } public function enable(comunidadVO:ComunidadVO):Boolean{ return comunidadVO.nombre!=null && comunidadVO.nombre!=""; } ]]> </mx:Script> </mx:CheckBox> </mx:Component> On Tue, Apr 27, 2010 at 3:10 PM, Oleg Sivokon <olegsivo...@gmail.com> wrote: > > > Hi, the list based controls may reuse the item renderers, however they > might not be aware of the changes that had happened to them. Normally you > would store the state with the data which the renderer has to display. So > that once the data is reset, the render appearance would reset with it. If, > for whatever reason you cannot store the state of the renderer with the > data, you would have to store the references to either manage the how the > item renderers are created (by using the itemRendereFunction for example), > or update the display of the control whenever the new (or an old new) item > renderer is added - IMO complicated. > > > -- Fernando Wermus. www.linkedin.com/in/fernandowermus