[Arp] ModelLocator - Events

nyls xxx at nyls.demon.nl
Thu Mar 16 03:39:59 PST 2006


MMM I got another version of Christophe's arpx extensions, where the model
dispatches change events when it's value is set. I can send you my arpx
extensions offlist if you want ? 

Further more different views can listen to one model an act differently on
model changes.. Like a view displaying the list of books , and a view
displaying a number of the total books .. but off course there can also be
only one model for one view . Depends on the app I think. 
 
nyls



-----Oorspronkelijk bericht-----
Van: Arp-bounces at ariaware.com [mailto:Arp-bounces at ariaware.com] Namens fluxs
Verzonden: donderdag 16 maart 2006 10:26
Aan: General List for Ariaware RIA Platform users and developers
Onderwerp: Re: [Arp] ModelLocator - Events

Keith Takayesu a écrit :

>In my example View called Books, the preLoader does this:
> 
>ModelLocator.getInstance().addModel("listOfBookCategories", new
>Object()); // Creates dummy model
>ModelLocator.getInstance().getModel("listOfBookCategories").addEventList
>ener("change", this);
>dispatchEvent ( { type: "getListOfBookCategories" } );
>  
>
I'm not sure to have the last version of Christophe's ModelLocator : the 
one I have doesn't have event dispatcher methods... I took it from the 
list's archive here :
http://ariaware.com/pipermail/arp_ariaware.com/2006-January/000873.html

Also I'm not used to use several Models, but from what I understand, a 
Model here is a set of data most of the time related with a view? For 
example a customerList Model's data will be an array of objects with 
customerName, customerEmail, customerOrderAmount and will be used to 
feed a DataGrid in a CustomerList form. Or a customerInfo will feed a 
CustomerInfo view and will feature firstname, lastname, address...

Is this the way Models are to store data?

fluxs


_______________________________________________
Arp mailing list
Arp at ariaware.com
http://ariaware.com/mailman/listinfo/arp_ariaware.com





More information about the Arp mailing list