[CLOSED] Autoload / Preload Tab Panels

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Autoload / Preload Tab Panels

    I have a tab panel with two tabs that I am trying to pre-load so the user does not perceive any wait period when clicking on the second tab. I have tried various uses of AutoLoad(true). I have also tried some code that I saw that loops through all the tabs in javascript and calls setActiveTab on every tab but this only makes the last tab the active tab.

    Given the following example, is there anyway to cause the 2nd tab to pre-load while still having loaded and displayed tab 1?

    
    @{
        Layout = "~/Views/Shared/_BaseLayout.cshtml";
        var X = Html.X();
    }
    
    @section headtag
    {
        
    }
    
    @section example
    {
        @(X.Window()
            .Title("test auto load tabs")
            .Width(700)
            .Height(500)
            .Icon(Icon.Link)
            .Layout(LayoutType.Border)
            .Items(
                X.TabPanel()
                    .ID("TabPanel1")
                    .Region(Region.Center)
                    .Items(
                        X.Panel()
                        .ID("tab1")
                        .Title("tab 1")
                        .Closable(false)
                        .Loader(Html.X().ComponentLoader().Url("http://www.microsoft.com")
                            .Mode(LoadMode.Frame)
                            .LoadMask(lm =>
                            {
                                lm.ShowMask = true;
                                lm.Msg = "Loading 1 ...";
                            }))
                            ,
                        X.Panel()
                        .ID("tab2")
                        .Title("tab 2")
                        .Closable(false)
                            .Loader(X.ComponentLoader().Url("http://www.ext.net")
                            .Mode(LoadMode.Frame)
                            .LoadMask(lm =>
                            {
                                lm.ShowMask = true;
                                lm.Msg = "Loading 2 ...";
                            }))
                            
                    )
            )
        )
    }
    Last edited by Daniil; May 30, 2015 at 2:24 PM. Reason: [CLOSED]

Similar Threads

  1. BorderSpec on Panels
    By dangerlinto in forum 2.x Help
    Replies: 1
    Last Post: Nov 24, 2013, 3:30 AM
  2. Replies: 5
    Last Post: May 17, 2013, 11:54 AM
  3. [CLOSED] So many panels and nested panels
    By thchuong in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 03, 2012, 5:23 AM
  4. Add Panels with Autoload to an accordion
    By Tallmaris in forum 1.x Help
    Replies: 1
    Last Post: Jul 26, 2011, 8:35 AM
  5. Replies: 6
    Last Post: Jun 15, 2011, 12:07 PM

Tags for this Thread

Posting Permissions