dimanche 5 octobre 2014

List item template from different stores

Hi,

I have two models (and two stores) the first one represent items coming from server and the second represent the selection of the user.


itemModel:



Code:



Ext.define('DinnerCall.model.ItemModel', { extend: 'Ext.data.Model',
config: {
fields: [
{
name: 'id'
},
{
name: 'picture'
},
{
name: 'title'
},
{
name: 'price'
},
{
name: 'description'
}
]
}
});

cartModel:


Code:



Ext.define('DinnerCall.model.CartModel', { extend: 'Ext.data.Model',


config: {
fields: [
{
name: 'id'
},
{
name: 'quantity'
},
{
name: 'price'
},
{
name: 'total'
}
]
}
});

List item template that I want to achieve, blue fields coming from ItemStore and red fields coming from PurchaseStore:



List item template from different stores

Aucun commentaire:

Enregistrer un commentaire