Cannot Open a New Tab on the TabPanel with Error Code 200

  1. #1

    Cannot Open a New Tab on the TabPanel with Error Code 200

    Hi,

    I am currently getting an error code 200 whenever I try to open a report on a new tab. The tab does not open. I am using a side panel for the reports and a tabPanel for the new tabs I have tried catching the error, but it still shows up. Please refer to the code below:

    Site (this is where the tabPanel and the reports are defined)


    <ext:Panel ID="pnlWest" Region="West" Collapsible="true" CollapseMode="Default" Margins="0 0 7 7" runat="server" Title="Start" Width="225" Frame="false">
              <Content>
                     <uc5:WestMenu ID="ucWestMenu" runat="server"/> //this is how I call the report
               </Content>
    </ext:Panel>
                   
    <ext:TabPanel Region="Center" Margins="0 7 7 0" ID="tpMain" runat="server" ActiveTabIndex="0" EnableTabScroll="true" Frame="true">
                <Items>
                        <ext:Panel ID="Tab1" Title="Home" Icon="House"  Closable="false" runat="server" Border="false" Layout="Fit"> 
          	    </Items>
    </ext:TabPanel>
    WestMenu (how reports are created)
    private Ext.Net.NodeCollection GetReports(Ext.Net.NodeCollection treeCollection)
        {
            if (treeCollection == null)
            {
                treeCollection = new Ext.Net.NodeCollection();
            }
    
            // Create the root
            Ext.Net.Node root = new Ext.Net.Node();
            root.NodeID = "root";
            treeCollection.Add(root);
    
            // Folder Node: Tasks
            Ext.Net.Node tnTasks = new Ext.Net.Node();
            tnTasks.Text = "Tasks";
            tnTasks.Icon = Icon.FolderEdit;
    
           if (this.ViewData["AccountNumber"].ToString().Contains("1")) 
            {
                Ext.Net.Node tnBreak1 = new Ext.Net.Node();
                tnBreak1.Text = "Manage Break";
                tnBreak1.Icon = Icon.ClockRed;
    
                Ext.Net.ConfigItem ciSite1 = new ConfigItem();
                ciSite1.Name = "url";
                ciSite1.Value = "https://custom.url.com/1/managebreak/";
                ciSite1.Mode = ParameterMode.Value;
                tnBreak1.CustomAttributes.Add(ciSite1);
    
                tnTasks.Children.Add(tnBreak1);
            }
    
     // Item Node: Sample Break Management Form
            Ext.Net.Node tnDoc3 = new Ext.Net.Node();
            tnDoc3.Text = "Sample Break Management Form";
            tnDoc3.Icon = Icon.PageWhiteAcrobat;
    
            Ext.Net.ConfigItem ciDoc3Site = new ConfigItem();
            ciDoc3Site.Name = "url";
            ciDoc3Site.Value = "/resources/docs/BreakManagement.pdf";
            ciDoc3Site.Mode = ParameterMode.Value;
            tnDoc3.CustomAttributes.Add(ciDoc3Site);
    
    tnComplianceLib.Children.Add(tnDoc3);
    
    
            root.Children.Add(tnTasks);
            root.Children.Add(tnComplianceLib);
    
            return treeCollection;
    }
    
    //This is how I call the JS function for adding a new tab
    <script type="text/javascript" src="/Scripts/name.js"></script>
    
    //this is the handler for when the reports are clicked
    tree.Listeners.ItemClick.Handler = "name.addTab({ tabPanel: #{tpMain}, id: node.attributes.id, title: node.attributes.text, icon: node.attributes.iconCls, url: node.attributes.url, rsurl: node.attributes.rsurl });";
    //this is the JS function for adding a new tab
    Ext.ns("name");
    
    name = {
        addTab: function (config) {
            var tabPanel = Ext.getCmp('tpMain');
            var tab = tabPanel.getComponent(config.id);
    
            if (Ext.isEmpty(config.url, false)) {
                return;
            }
    
    
            if (!tab) {
                tab = tabPanel.add({
                    id: config.id,
                    title: config.title,
                    iconCls: config.icon || 'icon-applicationdouble',
                    closable: true,
                    layout: 'fit',
                    autoLoad: {
                        showMask: true,
                        url: config.url,
                        iconCls: config.icon || 'icon-applicationdouble',
                        mode: 'iframe',
                        noCache: true,
                        maskMsg: "Loading '" + config.title + "'...",
                        scripts: true,
                        passParentSize: config.passParentSize,
                        params: { rsurl: config.rsurl }
                    }
                });
                tabPanel.setActiveTab(tab);
            } else {
                tabPanel.setActiveTab(tab);
                Ext.get(tab.tabEl).frame();
            }
        }
    };
    Additional Information: I have recently updated the ext version to the new one. As a result, I had to change some components to make it work. For instance, I changed Ext.Net.TreeNodeCollection into Ext.Net.NodeCollection and those using Node with Children (all there are from the ext.net breaking changes document).

    Thanks in advance!
  2. #2
    Hello!

    Could you provide a full sample to reproduce?

Similar Threads

  1. [CLOSED] [#9] TabPanel Loader issue
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 14
    Last Post: Jan 21, 2015, 2:45 PM
  2. PDF open from TabPanel
    By moth1 in forum 1.x Help
    Replies: 4
    Last Post: May 21, 2014, 3:50 AM
  3. [CLOSED] How to close all open tabs of a tabpanel, except one
    By JCarlosF in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 23, 2013, 4:22 PM
  4. [OPEN] [#46] TabPanel Firing Error
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Dec 18, 2012, 12:41 PM
  5. [CLOSED] Tabpanel in tabpanel from code behind
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 29, 2008, 7:56 AM

Tags for this Thread

Posting Permissions