[CLOSED] Multiple Partial Views and ResourceMgr.load() resource resolution fails

  1. #1

    [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:

    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]
  2. #2
    Hi Adriano,

    Thank you for the report. Could you, please, provide a test case to investigate the problem with?
  3. #3
    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.
  4. #4
    Yes, at first glance it should work, but I need a test case to comprehend the scenario better.
  5. #5
    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.

Similar Threads

  1. [CLOSED] Multiple PartialViews make the page very slow
    By asolvent in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 01, 2014, 1:19 PM
  2. Failed to load resource
    By zhdl in forum 2.x Help
    Replies: 0
    Last Post: Sep 07, 2012, 2:05 AM
  3. Failed to load resource
    By tuananhdnx in forum 1.x Help
    Replies: 3
    Last Post: Dec 27, 2011, 1:26 PM
  4. Load PartialViews on Panel
    By Dominik in forum 1.x Help
    Replies: 5
    Last Post: Feb 25, 2011, 9:19 AM
  5. Replies: 4
    Last Post: Feb 03, 2009, 9:52 AM

Posting Permissions