[CLOSED] Panel - ComponentLoader - frame is loading TWICE - Strange behaviour / BUG?

  1. #1

    [CLOSED] Panel - ComponentLoader - frame is loading TWICE - Strange behaviour / BUG?

    I have a docked panel with an iframe using ComponentLoader. The strange thing is that when the panel is collapsed/closed/hided the content is loadad again, and not only once but twice!!

    So starting the example below, closing the east-panel and reopen it causes the content to be loaded 5 times in total.

    I think that the content shouldn't even reload on any of these events: (collapsing/hinding/closing/reopening/showing etc).

    The right behavior should be that the panel should not unload or load the content more than once, at least if .CloseAction(CloseAction.Hide) is set.

    I am using the Chrome debugger -> Network.

    For the example I am loading a blank page, but this could be any URL.

        var x = Html.X();
            .Title("Border layout")
    And the controller code:
        public class HomeController : Controller
            public ActionResult Blank()
                return Content("");
    Last edited by fabricio.murta; Sep 02, 2016 at 9:07 PM.
  2. #2
    Hello @sveins12!

    How exactly are you interacting with the example you provided? I see no handlers nor buttons to replicate the effects you are describing in the example.

    Here's what I see if I run the example you provided:
    Click image for larger version. 

Name:	61365-panelWithoutHandlers.png 
Views:	9 
Size:	6.8 KB 
ID:	24720

    At least on first load, I don't get multiple accesses to the frame. Notice I changed your /home/blank action into /issues/c61365_Blank.
    Click image for larger version. 

Name:	61365-documentAccessOnLoad.png 
Views:	6 
Size:	42.7 KB 
ID:	24721

    It may be interesting if you had in your model a static integer variable and incremented it every time the blank action was called, then returned as the frame content the amount currently registered in that variable. Will clarify whether the action is actually being fetched repeatedly.

    Looking forward for your feedback!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Please double click on the splitter between the east-panel and the center-panel to close the east-panel. This will cause the frame to load twice.

    After that click on the upper-right arrow to reopen the east-panel. This will cause the frame to load twice more.


    I have now tried the counter thing you mentioned, and yes. After closing and reopening the east-panel it shows "Calls: 5".

        public class HomeController : Controller
            static int callsToBlank = 0;
            public ActionResult Blank()
                return Content(string.Format("Calls: {0}", ++callsToBlank));
    Last edited by sveins12; Aug 16, 2016 at 11:28 PM.
  4. #4

    This happens because of the animation. Just disable the collapse/expand animation and you should not see it anymore.

    The animation consists in copying the contents somewhere else and applying the animation whilst the main pane is hidden.

    The option you want to disable it is .AnimCollapse(false).

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Thank you. That works. This seems like an issue/bug, doesn't it? I think the animation should not do such things. Do you think this will be fixed?
  6. #6
    I didn't look really really into the animation protocol ExtJS implies, but I believe the same would happen, for example, if you create a draggable element and drag it with contents. At some point the element must be moved, or a copy created, before the drag animation starts.

    It looks to me like the IFrame is triggering the load when it is moved from one container (the panel) to the other (the animation frame).

    But it may be the case the iframe is completely hidden and another one is created to "play" the animation (to preserve initial frame dimensions, for example) then destroyed. In this second approach, it is sure that another reload will be necessary by the browser. But I don't discard the possibility of the reload even if the iframe is just moved around.

    That said, odds are towards browser/technology limitation with the animation, and not really a bug in the framework, which works with other content nicely if just moving components around the page.

    I can log an issue to track this as a feature if you really want this working for iFrames, but can't give you a deadline on when it's going to be working -- as it might as well be held by a design limitation on the ExtJS framework.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] GridPanel with selected rows Strange Behaviour
    By glenh in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 16, 2015, 9:44 PM
  2. [CLOSED] Strange problem when loading Ext.Net.Panel with Autoload.
    By Moltas in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 11, 2011, 8:23 AM
  3. Strange behaviour in markup
    By Paul D in forum 1.x Help
    Replies: 1
    Last Post: Nov 09, 2010, 1:27 PM
  4. [CLOSED] strange ComboBox behaviour
    By alexp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 01, 2009, 11:13 AM
  5. Gridpanel with combobox, strange behaviour
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 17, 2008, 6:59 AM

Posting Permissions