[FIXED] [#1493] [4.3.0] double loads

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    In your last post, you asked for a clean project solution so i thought u wanted a full clean project solution

    ajax.aspx
    <%@ Page Language="C#" %>
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(2000);
        }
    </script>
    
    
    <style>
        div.sourcecode {
            margin  : 12px 0;
            font    : normal 12px monospace;
            padding : 1em 1.5em;
            border  : 1px solid #2f6fab;
            color   : #3f747f;
            border-left      : 4px solid #2f6fab;
            background-color : #f9f9f9;
            overflow-y : hidden;
            overflow-x : auto;
        }
    </style>
    
    
    <div>
        <p>I am content loaded via Ajax. I was purposely delayed 2 seconds so you could see the Ajax loading indicator.</p>
    
    
        <div class="sourcecode">
            <div style="font-family: Courier New; font-size: 10pt; color: black;">
            <pre style="margin: 0px;"><span style="color: blue;">&lt;</span><span style="color: #a31515;">script</span> <span style="color: red;">runat</span><span style="color: blue;">="server"&gt;</span></pre>
            <pre style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">protected</span> <span style="color: blue;">void</span> Page_Load(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EventArgs</span> e)</pre>
            <pre style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</pre>
            <pre style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.Threading.<span style="color: #2b91af;">Thread</span>.Sleep(2000);</pre>
            <pre style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</pre>
            <pre style="margin: 0px;"><span style="color: blue;">&lt;/</span><span style="color: #a31515;">script</span><span style="color: blue;">&gt;</span></pre>
            </div>
        </div>
    
    
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
    </div>
    Default.aspx
    <%@ Page Language="C#" %>
    
    
    
    
    <!DOCTYPE html>
    
    
    
    
    <html>
    <head id="Head1" runat="server">
        <title>Fixed Height TabPanel with options - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    
    
    
    
        <script type="text/javascript">
    
    
    
    
            var testme = function () {
                addNewTab(App.TabPanel1, { title: 'Test Tab', url: 'ajax.aspx' });
            }
    
    
    
    
            var loadActiveTabWithNewUrl = function (url, title) {
                var tp = App.TabPanel1;
                var activeTab = tp.getActiveTab();
                if (title != null && title.length > 0) {
                    activeTab.setTitle(title);
                }
                debugger;
                activeTab.load({ url: url });
            };
    
    
    
    
            var hashCode = function (str) {
                var hash = new Date().getTime();
    
    
    
    
                for (var i = 0; i < str.length; i++) {
                    hash ^= ((hash << 5) + str.charCodeAt(i) + (hash >> 2));
                }
    
    
    
    
                return 'Z' + (hash & 0x7FFFFFFF);
            };
    
    
    
    
            var addNewTab = function (tp, config) {
                if (Ext.isEmpty(config.url, false)) {
                    return;
                }
                var id = this.hashCode(config.url);
                var tab = tp.getComponent(id);
                if (!tab) {
                    tab = tp.addTab({
                        id: id.toString(),
                        itemId: id.toString(),
                        title: config.title,
                        iconCls: config.icon || 'icon-applicationdouble',
                        closable: true,
                        loader: {
                            showMask: true,
                            renderer: 'frame',
                            params: { 'sourceContext': config.sourceContext || 'none', 'ruleId': config.ruleId || '0', 'itemId': config.itemId || '0', 'ids': config.ids || '' },
                            noCache: true,
                            url: config.url,
                            loadMask: {
                                showMask: true,
                                msg: "Loading '" + config.title + "'..."
                            },
                            scripts: true,
                            passParentSize: config.passParentSize
                        }
                    });
                } else {
                    tp.setActiveTab(tab);
                    Ext.get(tab.el).frame();
                }
    
    
    
    
                return tab;
            }
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
    
    
    
            <div>
                <h1>Fixed Height TabPanel with options</h1>
                <p>Tabs with no tab strip and a fixed height that scroll the content.</p>
            </div>
    
    
    
    
            <div>
                <ext:Button ID="fff" runat="server" Text="TESTSET">
                    <Listeners>
                        <Click Fn="testme" />
                    </Listeners>
                </ext:Button>
                <ext:ComboBox ID="Tesets" runat="server" EmptyText="Select a view" Editable="false" ForceSelection="true" >
                    <SelectedItems>
                        <ext:ListItem Index="1" />
                    </SelectedItems>
                    <Items>
                        <ext:ListItem Text="1 day view" Value="1" />
                        <ext:ListItem Text="7 day view" Value="7" />
                        <ext:ListItem Text="14 day view" Value="14" />
                        <ext:ListItem Text="28 day view" Value="28" />
                        <ext:ListItem Text="42 day view" Value="42" />
                    </Items>
                    <Listeners>
                        <Select Handler="App.WindowChooseCC7.show();/*  loadActiveTabWithNewUrl('/ta/Support/ajax?periodDays=' + App.Tesets.getValue());*/" />
                    </Listeners>
                </ext:ComboBox>
    
    
    
    
                <ext:TabPanel
                    ID="TabPanel1"
                    runat="server"
                    ActiveTabIndex="0"
                    Width="600"
                    Height="250"
                    Plain="true">
                    <Items>
                        <ext:Panel
                            ID="Tab1"
                            runat="server"
                            Title="Normal Tab"
                            Html="Default Panel"
                            BodyPadding="6"
                            AutoScroll="true"
                            />
                    </Items>
                </ext:TabPanel>
    
    
    
    
            </div>
    
    
    
    
            
    <ext:Window 
        ID="WindowChooseCC7" 
        runat="server" 
        Icon="ApplicationFormAdd" 
        Width="400" 
        AutoHeight="true"
        Hidden="true" 
        Modal="true"
        Title="Select..."
        Constrain="true">
        <Items>
            <ext:FormPanel
                ID="FormPanelChooseCC7" 
                runat="server" 
                Layout="FormLayout"
                BodyPadding="5"
                >
                <Items>
                    <ext:ComboBox ID="ComboBoxCC7Chooser" 
                        runat="server" 
                        Padding="5" 
                        DisplayField="description" 
                        TypeAhead="false"
                        ValueField="id" 
                        EmptyText="Select an item" 
                        Width="200"
                        FieldLabel="Num 7" >
                        <Items>
                            <ext:ListItem Text="rr" Value="rrr" />
                        </Items>
    
    
                    </ext:ComboBox>
                </Items>
                <BottomBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="ButtonSaveCCChooser" runat="server" Icon="Disk" Text="Load...">
                                <Listeners>
                                    <Click Handler="loadActiveTabWithNewUrl('ajax.aspx', 'test page'); " />
                                </Listeners>                                        
                            </ext:Button>
                            <ext:Button ID="ButtonCloseCCChooser" runat="server" Text="Close">
                                <Listeners>
                                    <Click Handler="#{WindowChooseCC7}.hide();" />
                                </Listeners>
                            </ext:Button>
                    </Items>
                    </ext:Toolbar>
                </BottomBar>
            </ext:FormPanel>
        </Items> 
    </ext:Window>
    
    
        </form>
    </body>
    </html>
  2. #12
    Hello @Z!

    Quote Originally Posted by z
    In your last post, you asked for a clean project solution so i thought u wanted a full clean project solution
    No, sorry, I didn't mean that. The clean project was just cause we were getting different results in the same test case and I was suspecting there could be some setting on the project you were using that were causing the bias.

    My apologies for not being clear enough! We'll review the code you just provided and get back to you as soon as we can!
    Fabrício Murta
    Developer & Support Expert
  3. #13
    Hello again @Z!

    Your sample is still the same from previous. Using google chrome here, it drops by the 'debugger;' line in loadActiveTabWithNewUrl() method just once.

    These are the exact steps I followed:

    1. open a tab and load developer tools, switching to the 'sources' tab
    2. load the page
    3. click TESTSET button
    it loads the tab below with the 'ajax.aspx' page
    4. choose 14 day view from the dropdown right below the TESTSET button
    the select... window shows up
    5. choose rr from the dropdown in the window
    6. click Load... button in the Select... window
    it stops by the debugger; line 37 in the provided Default.aspx code
    7. I hit F8 so that it continues
    it runs until idle. Briefly shows a 'waiting for localhost' status message in the browser's lower-left corner.

    But it never stops again by the 'degugger;' line. I also tried adding a breakpoint in the loadActiveTabWithNewUrl() method for no avail.

    Of course, if I click again the Load... button, it will stop again. But just once per button click, not twice, as if it were being called twice.

    It is strange you are triggering this twice. Any chance you would be using any browser extension that may be mangling the page behavior?
    Fabrício Murta
    Developer & Support Expert
  4. #14
    I think u are misunderstanding the problem. loadActiveTabWithNewUrl is only called once. But I can see ajax.aspx loaded twice in fiddler.

    Same code worked fine in ext versions 1 and 3.

    I can clearly reproduce it on IE 11

    On step 7, step into the ext code line by line.

    No browser extensions

    I am happy to show u on a WebEx.
    /z
    Last edited by Z; Jun 06, 2017 at 5:27 PM.
  5. #15
    Hello @Z!

    Thanks for letting us know it happens on IE11! I've just tested it in IE11 and found "kind of" two loads if I watch the "Network" tab in IE11's debugging tools (I believe this is what you're calling "fiddler"?), being one of them usually cancelled by the second that comes right away. If you step thru the debugger, then you take long enough between each command for both loads to actually happen.

    That shouldn't be an issue as the first request is interrupted right when the second is made, is that?..

    Anyway, we will review the github issue and forum thread mentioned in the code to understand what that got in there and we'll probably limit that first load code to be run on IE9 only.
    Fabrício Murta
    Developer & Support Expert
  6. #16
    Great to hear!!

    In our case, we have a code behind on page load that inserts records in db. This causes a delay allowing second call to activate. It deadlocks the DB and causes a mess.

    I will build latest ext and test as soon as it is committed.

    Thxs
    /Z
  7. #17
    Hello again!

    We've just logged this issue as #1493 in our bug tracking service! We're testing the fix so that it does not re-open old bugs before merging it to the final code.
    Fabrício Murta
    Developer & Support Expert
  8. #18
    Once again, hello! We have another update here and would like to hear back from you whether this fixed or not in your side.

    We've just pushed the fix, the double load I noticed on Internet Explorer 11 is no longer being reproduced. It would be great to know if that fix works for you too!
    Fabrício Murta
    Developer & Support Expert
  9. #19
    deleted...
    Last edited by Z; Jun 08, 2017 at 5:56 AM.
  10. #20
    verified fixed.
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] on demand loads
    By Z in forum 4.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 12, 2017, 4:43 AM
  2. [CLOSED] Combobox loads twice
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 13, 2014, 8:35 PM
  3. [CLOSED] Store loads twice
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Jul 20, 2012, 2:55 PM
  4. Replies: 2
    Last Post: Aug 04, 2011, 2:14 PM
  5. Window don't loads correctly in the IE7
    By flaviodamaia in forum 1.x Help
    Replies: 4
    Last Post: Jul 21, 2009, 2:42 PM

Posting Permissions