Another alternative would be to extend ArrayCollection, or whatever collection type desired, with a status property.
-TH --- In [email protected], Richard Rodseth <rrods...@...> wrote: > > The map shouldn't interact with the PM (other than building it with > ObjectBuilder and injecting it into the view). > I'm leaning towards a). That way it's centralized and manager properties can > potentially be injected into multiple presentation models. > > > > > On Fri, Jul 2, 2010 at 1:56 PM, turbo_vb <timh...@...> wrote: > > > > > > > I usually use (b). For the error, you can call a public method in the PM > > from the faultHandler in the map; as one alternative. > > > > > > --- In [email protected] <flexcoders%40yahoogroups.com>, Richard > > Rodseth <rrodseth@> wrote: > > > > > > Design question for any other Mate users out there. Will cross-post to > > Mate > > > forum. > > > > > > I use Mate with the Manager + Presentation Model pattern. > > > i.e. presentation model dispatches bubbling events. Mate event map > > invokes > > > services calls, sets result on manager. Properties are injected from > > manager > > > to presentation model. > > > > > > I find it very convenient to have a "data status" property in the > > > presentation model for each service call, with values NOT_CURRENT, > > LOADING, > > > LOADED and ERROR. Then the view can display appropriate status and > > progress > > > indicators based on this property. > > > > > > One approach (a) is to have the event map set the status on the manager > > and > > > have the map inject that status into the presentation model. > > > > > > Another (b) is to set the status in the presentation model just before > > > dispatching the event, and when receiving the result (i.e. in a custom > > > setter). > > > > > > I like the directness of (b), but it doesn't cover the error case unless > > the > > > manager also has something like a faultevent property that also gets > > > injected into the presentation model. > > > > > > A third approach (c) would use listener injectors. The map would inject a > > > listener into the presentation model and would announce a special failure > > > event. > > > > > > Thoughts? > > > > > > > > > >

