PDA

View Full Version : azure extension requires init and making autoLoad store fail



pkellner
7 Apr 2014, 11:56 AM
Is there a way to h ave Ext.Azure.init(this.config.azure); run such that if a store with an azure proxy has autoLoad set to true, it does not error (because Azure init has not been called)?

It's not obvious to me where that place should be, but as is, I think that autoLoad will always cause the store to fail with a bad url. This is the kind of thing that really mixes people up when they are first trying to get it working.

pkellner
7 Apr 2014, 11:59 AM
I end up writing code like this: (I'm sure there is a better way)



Ext.Azure.init(this.config.azure);
var store = Ext.data.StoreManager.lookup("TodoItems");
store.load({
callback: function(records, operation, success) {
Ext.create('MyOrg.view.MyPanel2', {fullscreen: true});
},
scope: this
});