I'm a novice with extjs. I have a ViewModel which autoLoads a store. However, I need to pass a parameter to my Read method in the store's api. How would I go about doing that in the below scenario? I tried to put paramOrder on the proxy but that didn't work.
ViewModel:
Code:
Ext.define('Rsvp.Web.grid.DelegateViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.delegate',
stores: {
delegateStore: {
type: 'delegateList',
autoLoad: true,
}
}
});
Store:
Code:
Ext.define('Rsvp.Web.store.DelegateList', { extend: 'Ext.data.Store',
storeId: 'delegates',
requires: [
'Rsvp.Web.model.Delegate'
],
model: 'Rsvp.Web.model.Delegate',
alias: 'store.delegateList',
proxy: {
api: {
read: 'Direct.SessionOrganizer.GetDelegatesBySession',
create: 'Direct.SessionOrganizer.InsertDelegate',
destroy: 'Direct.SessionOrganizer.RemoveDelegate'
},
writer: {
writeAllFields: true,
encode: false
}
}
});