PDA

View Full Version : [CLOSED] Multiple Partial Views and ResourceMgr.load() resource resolution fails



adrianot
Dec 15, 2014, 7:50 AM
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:


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

Daniil
Dec 15, 2014, 3:52 PM
Hi Adriano,

Thank you for the report. Could you, please, provide a test case to investigate the problem with?

adrianot
Dec 15, 2014, 4:20 PM
Hi Daniil,
unfortunately I can't provide a test case right now since I am quite busy, do you think that the code should work in this situation?

Thank you.

Daniil
Dec 15, 2014, 5:23 PM
Yes, at first glance it should work, but I need a test case to comprehend the scenario better.

Daniil
Dec 23, 2014, 5:34 PM
I am closing the thread, but please feel free to update with any new info. I will get a notification and post a follow-up.