Dec 15, 2014, 7:50 AM
[CLOSED] Multiple Partial Views and ResourceMgr.load() resource resolution fails
Hello,
I am experiencing an issue when dynamically loading modules which, in turn, request dynamic resources to be loaded on demand.
It look like the following method is the root cause of the issue:
I tried to workaround by removing the "this.queue.clear()" method call, but I am not aware if this action is safe or not...
Do you have any suggestion?
Thank you!
Adriano
I am experiencing an issue when dynamically loading modules which, in turn, request dynamic resources to be loaded on demand.
It look like the following method is the root cause of the issue:
Ext.net.ResourceMgr.load()
Basically, when we have multiple dynamically-loaded "panels", it gets called multiple times and the "queue" used to load the resources gets emptied just when the load method gets called:load: function(config, groupCallback) {
this.queue.clear();
if (groupCallback) {
groupCallback = {fn: groupCallback,counter: config.length || 1,config: config,step: function() {
this.counter--;
if (this.counter === 0) {
this.fn.apply(window, [this.config]);
}
}};
}
Here if you look the code above, you can see "this.queue.clear()". This method is called in a singleton (Ext.net.ResourceMgr): obviously the queue is cleared at each call, meaning that any resource that didn't resolve "on time" is cleared from the queue and not resolved at all.I tried to workaround by removing the "this.queue.clear()" method call, but I am not aware if this action is safe or not...
Do you have any suggestion?
Thank you!
Adriano
Last edited by Daniil; Dec 23, 2014 at 5:32 PM.
Reason: [CLOSED]