Tabpanel - Autoload only on tab click/Activate

  1. #1

    Tabpanel - Autoload only on tab click/Activate

    I have the following tab pabel - I am trying to autoload each tab only when clicked - seems like both tabs are loading at the same time - when tabpanel loads?

    
    
    <ext:TabPanel ID="TabPanel1" runat="server" Plain="True" DeferredRender="true"
    
    
    Height="620">
    
    
    <Tabs>
    
    
    <ext:Tab ID="Tab1" runat="server" Title="CDM Detail" >
    
    
    <AutoLoad Mode="IFrame" Url="CDMEditor.aspx" ShowMask="true" TriggerEvent="Activate" ManuallyTriggered="true" MaskMsg="Loading CDM Detail... Please wait...">
    
    
    </AutoLoad>
    
    
    <Listeners>
    
    
    <Activate Handler="this.reload();" />
    
    
    </Listeners>
    
    
    </ext:Tab>
    
    
    <ext:Tab ID="Tab2" runat="server" Title="CDM Summary">
    
    
    <AutoLoad Mode="IFrame" Url="CDMEditorSummary.aspx" ShowMask="true" ManuallyTriggered="true" MaskMsg="Loading CDM Summary... Please wait...">
    
    
    </AutoLoad>
    
    
    <Listeners>
    
    
    <Activate Handler="this.reload();" />
    
    
    </Listeners>
    
    
    </ext:Tab>
    
    
    </Tabs>
    
    
    </ext:TabPanel>
  2. #2

    RE: Tabpanel - Autoload only on tab click/Activate

  3. #3

    RE: Tabpanel - Autoload only on tab click/Activate

    Thanks - that worked - I have the trigger event to show - is there a way to determine if the Tab has been loaded - dont reload, but if there is nothing loaded, then load?
  4. #4

    RE: Tabpanel - Autoload only on tab click/Activate

    OK - I have it loading on demand when I am switching between the two coolite tabs - however, I have my coolite Tabpanel nested in a MS AjaxToolkit tabpanel - on a MS tab - the user clicks a button and the toolkit tab index is set to diaply the tab with the Coolite tabpanel - and a check in my documentready listener sees which button was checked and then set the coolite activetabpanel accordingly... Problem is that when I do this - both tabs seem to load in parallel - no longer loading on activate, etc.




    <ext:ScriptManager ID="ScriptManager1" Theme="Gray" runat="server">


    <Listeners>


    <DocumentReady Fn="viewTest()" />


    </Listeners>


    </ext:ScriptManager>


    <ext:TabPanel ID="TabPanel1" runat="server" Plain="True" DeferredRender="false" Height="620">


    <Tabs>


    <ext:Tab ID="Tab1" runat="server" Title="CDM Detail">


    <AutoLoad Mode="IFrame" Url="CDMEditor.aspx" ShowMask="true" ManuallyTriggered="true"


    MaskMsg="Loading CDM Detail... Please wait...">


    </AutoLoad>


    <Listeners>


    <Activate Handler="if(typeof window.&#100;ocument.frames[0] !== 'object'){#{Tab1}.reload();}" />


    </Listeners>


    </ext:Tab>


    <ext:Tab ID="Tab2" runat="server" Title="CDM Summary">


    <AutoLoad Mode="IFrame" Url="CDMEditorSummary.aspx" ShowMask="true" ManuallyTriggered="true"


    MaskMsg="Loading CDM Summary... Please wait...">


    </AutoLoad>


    <Listeners>


    <Activate Handler="if(typeof window.&#100;ocument.frames[1] !== 'object'){#{Tab2}.reload();}" />


    </Listeners>


    </ext:Tab>


    </Tabs>


    </ext:TabPanel>


    and here is my JS listener function




    function viewTest() {


    var CheckTest2 = top.&#100;ocument.getElementById("rbSummary");


    if (CheckTest2.checked) {


    TabPanel1.setActiveTab(1);


    Tab2.reload();


    }


    else {


    TabPanel1.setActiveTab(1);


    }


    }
  5. #5

    RE: Tabpanel - Autoload only on tab click/Activate

    Ok - wierd thing is that if, from the JS below - the activeTabIndex = 1 then both tabs load - if it hits the else condition = ActiveTabIndex of 0 - then the tabs work as expected...




    function viewTest() {


    var CheckTest2 = top.&#100;ocument.getElementById("rbSummary");


    if (CheckTest2.checked) {


    TabPanel1.setActiveTab(1);


    Tab2.reload();


    }


    else {


    TabPanel1.setActiveTab(0);


    }


    }
  6. #6

    RE: Tabpanel - Autoload only on tab click/Activate

    So - it looks like setActiveTab initiates Activate as when I plug an alert into the Tab 1 Activate listeners and exec my JS above - Tab1 gets activated/loaded every time - any way around that?

Similar Threads

  1. Replies: 1
    Last Post: May 18, 2012, 1:52 PM
  2. Replies: 0
    Last Post: May 07, 2012, 7:50 AM
  3. Replies: 3
    Last Post: Dec 08, 2011, 8:14 AM
  4. [CLOSED] Make enter key activate button click direct event
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 15, 2010, 6:02 PM
  5. Tabpanel / Tab activate event
    By locoperoguapo in forum 1.x Help
    Replies: 1
    Last Post: Feb 17, 2009, 1:09 PM

Posting Permissions