[Arp] ModelLocator - Events
fluxs
fluxs at free.fr
Thu Mar 16 01:26:10 PST 2006
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
More information about the Arp
mailing list