When I load a repository using a tree component using
store: 'somestore'
which has the following setting:
Ext.define('App.store.AdminNavigationTree', { extend: 'Ext.data.TreeStore', model: 'App.model.AdminNavigationTree', storeId: 'AdminNavigationTree', headers: { 'Content-Type': 'application/json' }, proxy: { type: 'ajax', url: settings.ApiUrl + '/View/AdminNavigation/?format=json', reader: { type: 'json', root: 'result', } }, folderSort: true });
Data is loading normally.
When you try to call store.load with the following repository in order to fill out the form, this is not so!
Ext.define('App.store.PromotionCompany', { extend: 'Ext.data.Store', model: 'App.model.PromotionCompany', storeId: 'PromotionCompany', headers: { 'Content-Type': 'application/json' }, proxy: { type: 'ajax', url: settings.ApiUrl + '/Model/PromotionCompany/?format=json', reader: { type: 'json', root: 'result', } } });
I use ServiceStack for the API, and both of these URLs are set to [EnableCors] and indeed when calling store.load with the following:
store.load({ params: { id: pcid }, callback: function (records, options, success) {
I see a request coming in to the API and returning the correct data!
Does anyone know what ExtJs can do here?