Show and hide Tabs in TabPanel error

  1. #1

    Show and hide Tabs in TabPanel error

    Hi,
    I have a error when I try to show/hide Tabs in TabPanel via code.
    I have a panel on the left and I want that when I expand or collapse his item the Tabs in TabPanel show/hide.
    The solution work if I define the panel as:
    <ext:Panel id="Test" Title="Test" runat="server" Border="false" BodyPadding="6" Icon="User" Closable="true" CloseAction="Hide" />
    but work only a few times and then crash if I define the panel as:
    <ext:Panel id="Test" Title="Test" runat="server" Border="false" BodyPadding="6" Icon="User" Closable="true" CloseAction="Hide">
                                <Loader mode="Frame" ID="LoaderConfigUsersTest" runat="server" Url="Configurations/ConfigUsers.aspx">
                                    <LoadMask ShowMask="true" />
                            </Loader>
    </ext:Panel>
    In the second case i receive the JS error:
    "Ext is not defined"

    Here is my complete code:

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ApplicationConfig.aspx.cs" Inherits="WEB_CAR.ApplicationConfig" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
    
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <ext:ResourceManager ID="ResourceManagerMain" runat="server" />   
    
        <ext:Toolbar ID="ToolbarMain" runat="server" onload="ToolbarMain_Load" />
    
        <div class="main">
            <ext:Viewport runat="server" Layout="BorderLayout" StyleSpec="background-color: transparent;" >
                <Items>
                    <ext:Panel ID="GroupsConfig" runat="server" Title=" Groups" Region="West" Layout="AccordionLayout" Width="150" MinWidth="130" MaxWidth="300" Frame="true" 
                        Split="true" 
                        Collapsible="true"
                        Margins="135 0 25 15">
                        <Items>
                            <ext:Panel ID="pnlMasterData" runat="server" Title="Master data" Border="false" BodyPadding="6" Icon="Cog" Collapsed="false">
                                <Listeners>
                                    <Expand Handler="#{TabPanelItems}.addTab(#{Test});"></Expand>
                                    <Collapse Handler="#{TabPanelItems}.closeTab(#{Test});"></Collapse>
                                </Listeners>
                                <Items>
                                    <ext:FieldContainer ID="FieldContainer1" runat="server" AnchorHorizontal="100%" Layout="VBoxLayout"> 
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="6 3 0 7" Mode="Value" />
                                        </Defaults>  
                                        <Items>                         
                                            <ext:Button ID="lblUsers" runat="server" Text="Users" Icon="User" Margins="12 3 0 7" Flat="true" Width="115" TextAlign="Left" OnClientClick="#{TabPanelItems}.setActiveTab(#{PanelConfigUsers})" />
                                            <ext:Button ID="lblUserGroups" runat="server" Text="UserGroups" Icon="Group" Flat="true" Width="115" TextAlign="Left" OnClientClick="#{TabPanelItems}.setActiveTab(#{PanelConfigUserGroups})" />
                                            <ext:Button ID="lblCurrencies" runat="server" Text="Currencies" Icon="Money" Flat="true" Width="115" TextAlign="Left" OnClientClick="#{TabPanelItems}.setActiveTab(#{PanelConfigCurrencies})" />
                                            <ext:Button ID="lblProjectTypes" runat="server" Text="Project types" Icon="NoteEdit" Flat="true" Width="115" TextAlign="Left" OnClientClick="#{TabPanelItems}.setActiveTab(#{PanelConfigProjectTypes})" />
                                            <ext:Button ID="lblLedgers" runat="server" Text="Ledgers" Icon="ServerDatabase" Flat="true" Width="115" TextAlign="Left" OnClientClick="#{TabPanelItems}.setActiveTab(#{PanelConfigLedgers})" />
                                            <ext:Button ID="lblProductLines" runat="server" Text="Product lines" Icon="ServerWrench" Flat="true" Width="115" TextAlign="Left" OnClientClick="#{TabPanelItems}.setActiveTab(#{PanelConfigProductLines})" />
                                        </Items>
                                    </ext:FieldContainer>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
    
                    <ext:TabPanel ID="TabPanelItems" runat="server" Region="Center" Margins="135 15 25 0">
                        <Items>
                            <ext:Panel id="Test" Title="Test" runat="server" Border="false" BodyPadding="6" Icon="User" Closable="true" CloseAction="Hide">
                                <Loader mode="Frame" ID="LoaderConfigUsersTest" runat="server" Url="Configurations/ConfigUsers.aspx">
                                    <LoadMask ShowMask="true" />
                                </Loader>
                            </ext:Panel>
                        </Items>
                    </ext:TabPanel>
                </Items>
            </ext:Viewport>
        </div>
    
    </asp:Content>

    Have you any suggestion?
    Thank you very much!

    Stefano Lonati
  2. #2
    I cannot reproduce the issue with latest code. Try to retest after 2.1 release

Similar Threads

  1. [CLOSED] TabPanel Show/Hide Panel
    By amitpareek in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 02, 2012, 3:21 PM
  2. [CLOSED] TabPanel - Tab hide/show Unnecessary postbacks
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 22, 2011, 8:59 AM
  3. [CLOSED] show and hide tabs
    By sharif in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 12, 2010, 3:31 PM
  4. Show/Hide tabs
    By stone216 in forum 1.x Help
    Replies: 2
    Last Post: Oct 01, 2009, 8:21 PM
  5. TabPanel + Dynamic tab show/hide
    By reinaldo.designerdigital in forum 1.x Help
    Replies: 3
    Last Post: Feb 06, 2009, 12:26 PM

Tags for this Thread

Posting Permissions