But in this case it's not an item in the ArrayCollection that changed, but
instead the criteria you want to filter with, so you need to refresh
manually, unless I'm missing something.

Scott

On Tue, Jul 22, 2008 at 3:11 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>    In theory, if you have [Bindable] or [Managed] items in the collection,
> or call itemUpdated appropriately, you do not need to call refresh() again
> when an item's properties change.
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Troy Gilbert
> *Sent:* Tuesday, July 22, 2008 11:49 AM
> *To:* [email protected]
> *Subject:* Re: [flexcoders] Re: Filter an ArrayCollection into an
> ItemRender
>
>
>
> > You need to call collectionData.refresh() when the data property changes
> for
> > the itemRenderer. One way to do it would be:
>
> I always wonder what's the best practice for this. I would think that
> collections would have this built into them... why would one want to
> put a filter function on a collection and not use it when the
> collection was updated/changed? At the very least, it seems like a
> good candidate for a flag (refreshOnChange, for example).
>
> > <mx:Binding source="data" destination="dataChanged"/>
> >
> > then add the method:
> >
> > private function dataChanged(data:Object):void {
> > collectionData.refresh();
> > }
>
> I thought I had seen something like this but couldn't find a mention
> of it in the docs for the binding tag... so, destination can be a
> method that's called when data is changed? Does it need to be a setter
> (like BindingUtils)?
>
> Troy.
>
>  
>

Reply via email to