I have modular application that contains several modules/plugins, that can also run as standalone applications.
I dynamically register module/plugin controllers to main application and here is the problem in steps.
- My main app has A prefix - its controller" A.controller.AppController.
- My plugin has B prefix - its controller: B.controller.PortalController
Code of plugin controller:
Ext.define('B.controller.PortalController', {
extend: 'Ext.app.Controller',
views: [
'portal.MapPanel',
'administration.ConfigPanel',
'administration.ConfigPanelWrapper'
],
//stores:['Test'],
init: function() {
console.log('portal controller init');
//console.log(this.getTestStore());
this.control({
});
}
});
The views register properly with B prefix, Ext.Loader loads B.view.portal.MapPanel but the store is not loaded.
If I specify stores:['Test'] it tries to load A.store.Test, If I specify test.Test it does nothing (like error but ext-all-debug does not catch it) and if I specify stores:['B.store.Test'] it loads it properly but now I have to use getBStoreTestStore() to get the store reference that will cause a lot of code changing.
How to make the controller to load stores with proper prefix?