-Tom
Hey Tom,
In response to this question and the BindingUtils and
ArrayCollection.filter question, I offer this suggestion. In the
ModelLocator maintain a single master Array of all the users. Then
in each instance of your view components, create a new bound
ArrayCollection (dataProvider), with the master Array as the
underlying source. Each of the ArrayCollections will have a
different filterFunction based on the type of view component that is
instantiated. Because the ArrayCollections don't actually contain
any data, just pointers to the underlying Array, I would handle the
ArrayCollections and filterFunctions in viewHelpers. In a sense,
you would be creating separate sub-sets of the master Array in each
instance of your views. If you preferred, you could maintain each
ArrayCollection (Array of ArrayCollections) in the ModelLocator as
well.
I hope that this makes sense,
Tim Hoff
--- In [email protected], "Tom Bray" <[EMAIL PROTECTED]> wrote:
>
> Say my model has an ArrayCollection of all the users that are
> connected to my Flex app. I then have configurable list views that
> display different subsets of that collection based on different
user
> properties (gender, age, location, etc.). Multiple views, multiple
> filters, all being fed from the same master ArrayCollection of all
> connected users. I even want the user to be able to dynamically
> create new views with different filters.
>
> Unless there's something I'm missing, each view is going to need
its
> very own ArrayCollection that has its own filter function set up.
I'm
> picturing a wrapper class that provides addFilter() and
removeFilter()
> methods so that the AC's filter function can traverse an array of
> other filters -- kind of a CompoundCommand pattern.
>
> Assuming that's part of the correct approach, I want my master AC
to
> pump changes out to the filtering ACs which pump changes out to the
> views. Is there a way to make the binding mechanism work for this?
> Is there a simpler approach I'm overlooking?
>
> Any tips you can send my way would be greatly appreciated.
>
> Thanks,
>
> Tom
>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [flexcoders] Re: need strategy for filtering ArrayCollec... Tom Bray
- [flexcoders] Re: need strategy for filtering ArrayColle... Tim Hoff
- [flexcoders] Re: need strategy for filtering ArrayC... Tim Hoff
- Re: [flexcoders] Re: need strategy for filtering Ar... Tom Bray
- [flexcoders] Re: need strategy for filtering Ar... Tim Hoff
- Re: [flexcoders] Re: need strategy for filt... Tom Bray
- [flexcoders] Re: need strategy for fil... Tim Hoff
- Re: [flexcoders] Re: need strategy... Jeremy Lu
- RE: [flexcoders] Re: need stra... Paul Williams
- Re: [flexcoders] Re: need stra... Tom Bray
- [flexcoders] Re: need strategy... Tim Hoff
Reply via email to

