mercredi 15 octobre 2014

Updating View via ViewModel and data store

I'm having some trouble trying to get the View to update correctly when setting the data via a store. I've set up a fiddle with (hopefully) minimal files, but that does not even display any of my fiddle, but at least has my files. The fiddle is here http://ift.tt/1wadgTd

Within my app I have a view (DetailsPanel.js), a viewcontroller (PropertyController.js), a viewModel (PropertyModel.js), a store (Property.js) and a model (PropertyDetail.js).


If I set a value specifically in my viewModel using the "stores" property and bind that value in my view, then it displays correctly. However, when I use a data store (using type: "property" to match my store), nothing displays. I also get a warning "Ext.data.store created with no model" and an error of "cannot read 'get' of property undefined" The store has a value returned to it, but nothing displays from that store in my view


Now I am wondering if it is because the store returns back an array of values??!? I'm using the bind: '{details}' in my view, then trying to reference that from my displayfield via a bind: '{detail.ADDRESS1}'. Should I be doing something using an array somehow?






Updating View via ViewModel and data store

Aucun commentaire:

Enregistrer un commentaire