[CLOSED] Problem opening multiple tabpanels the same time.

Page 1 of 6 123 ... LastLast
  1. #1

    [CLOSED] Problem opening multiple tabpanels the same time.

    I am opening the pages in my TabPanel.
    I have a TreePanel with a listner that calls the javascript "loadPageTreeMenu.
    When I open a page it takes awhile to load, because it makes searching the database and other things. So far so good.

    But if I click a menu item and quickly click on another menu item it opens the first tab and start loading the page normally, but clicking on the second menu item for it to load the first page, usually the last opening and aborting the request first.

    How can I make this not happen?


    Listener the TreePanel
    <Listeners>
                   <Click Handler="node.toggle(); if (node.attributes.href) { e.stopEvent(); loadPageTreeMenu(#{TabPanelPages}, node); }" />
                </Listeners>
    <script type="text/javascript">
    var loadPageTreeMenu = function (tabPanel, node) {
                var tab = tabPanel.getItem(node.id);
    
                if (!tab) {
                    tab = tabPanel.add({
                        id: node.id,
                        title: node.text,
                        closable: true,
                        autoLoad: {
                            showMask: true,
                            url: node.attributes.href,
                            mode: "iframe",
                            maskMsg: "Carregando " + node.text + "..."
                        }
                    });
                }
    
                tabPanel.setActiveTab(tab);
            }
    </script>
    Last edited by Daniil; Jun 02, 2011 at 7:16 AM. Reason: [CLOSED]
  2. #2
    Hi,

    I can suggest to use a mask - Ext.net.Mask.show() to show and Ext.net.Mask.hide() to hide.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    I can suggest to use a mask - Ext.net.Mask.show() to show and Ext.net.Mask.hide() to hide.
    Is there any place where I can shoot the "Ext.net.Mask.show ()" when the page finished loading the run hide?
  4. #4
    You can use Update listener of Panel.
  5. #5
    Quote Originally Posted by Daniil View Post
    You can use Update listener of Panel.
    This way?
    What would be the correct way to do?

    <ext:TabPanel ID="TabPanelPages" runat="server" EnableTabScroll="true" Cls="CssExtTabPages"
                            MinHeight="200px" MinWidth="130px" LabelPad="5">
                            <Items>
                                <ext:Panel ID="tabMonitor" runat="server" Title="Monitor" AutoScroll="true">
                                    <AutoLoad Url="../UT/Geral/Views/MonitorReportRequest.aspx" Mode="IFrame" />
                                </ext:Panel>
                            </Items>
                            <Listeners>
                                <TabChange Handler="onTabChange(TreePanel1, tab)" />
                                <BeforeTabClose Handler="return unLoadPage(this, tab)" />
                                <BeforeUpdate Handler="Ext.net.Mask.show();" />
                                <Update Handler="Ext.net.Mask.hide();"/>
                            </Listeners>
                        </ext:TabPanel>
  6. #6
    I guess you need to show mask in TreePanel's Click listener.

    And yes, hide in Panel's Update listener.
  7. #7
    Quote Originally Posted by Daniil View Post
    I guess you need to show mask in TreePanel's Click listener.

    And yes, hide in Panel's Update listener.
    I'm using "showmask"in my javascript function, this would not be enough?
    To not have the problem of not continue loading the page?

    var loadPageTreeMenu = function (tabPanel, node) {
                var tab = tabPanel.getItem(node.id);
    
                if (!tab) {
                    tab = tabPanel.add({
                        id: node.id,
                        title: node.text,
                        closable: true,
                        autoLoad: {
                            showMask: true,
                            url: node.attributes.href,
                            mode: "iframe",
                            maskMsg: "Carregando " + node.text + "..."
                        }
                    });
                }
    
                tabPanel.setActiveTab(tab);
            }
  8. #8
    It's not enough because it will show a mask on loading Panel only, not on a whole page => not on Tree => so, it doesn't prevent clicks on nodes.
  9. #9
    Quote Originally Posted by Daniil View Post
    It's not enough because it will show a mask on loading Panel only, not on a whole page => not on Tree => so, it doesn't prevent clicks on nodes.
    But there's a way to not lock the treeview.
    That let you click on various menu items, but all are loaded.
  10. #10
    Please provide a full, but simplified, sample to reproduce.
Page 1 of 6 123 ... LastLast

Similar Threads

  1. opening severall time a desktop window
    By feanor91 in forum 1.x Help
    Replies: 4
    Last Post: Dec 22, 2011, 11:49 AM
  2. [CLOSED] Problem opening a popoup window
    By sisa in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 15, 2011, 12:31 PM
  3. [CLOSED] Problem opening a Window that contains UserControl
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 26, 2011, 3:42 AM
  4. [CLOSED] Problem with focus and tabpanels under IE9
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Jun 14, 2011, 4:42 PM
  5. [CLOSED] Problem with GridPanel BottomBars on a TabPanels
    By asztern in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 22, 2010, 3:11 PM

Posting Permissions