[CLOSED] TabPanel Ajax Loading Problem

  1. #1

    [CLOSED] TabPanel Ajax Loading Problem

    Hello,

    I'm trying to use the Loader URL functionality of a TabPanel to load the contents of a panel via another .aspx page.
    I can step through the code to see that the child .aspx page is getting called and should be rendering, but it doesn't.
    I have a create a small sample to demonstrate the problem (just click on Tab2).
    I appreciate any help you can give me.

    Contents of "tabpaneltest.aspx"
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.Net.X.IsAjaxRequest)
                this.pnlTest1.Title = "TabPanel 1";
        }
    </script>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head runat="server">
            <title>TabPanel Test</title>
        </head>
        <body>
            <ext:ResourceManager ID="rm1" runat="server" />
            <form id="form1" runat="server">
                <ext:Viewport ID="Viewport1" runat="server" StyleSpec="background-color: transparent;" Layout="BorderLayout">
                    <Items>
                        <ext:TabPanel 
                            ID="TabPanel1"
                            Region="Center"
                            runat="server"
                            ActiveTabIndex="0" >
                            <Items>
                                <ext:Panel 
                                    ID="Tab1" 
                                    runat="server" 
                                    Title="Tab1" 
                                    Layout="Fit">
                                    <Items>
                                        <ext:Panel ID="pnlTest1" runat="server" AutoScroll="true">
                                        </ext:Panel>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel 
                                    ID="Tab2" 
                                    runat="server" 
                                    Title="Tab2" 
                                    Layout="Fit">
                                    <Loader runat="server" Url="paneltest.aspx">
                                        <LoadMask ShowMask="true" />
                                    </Loader>
                                </ext:Panel>
                            </Items>
                        </ext:TabPanel> 
                    </Items>
                </ext:Viewport>
            </form>
        </body>
    </html>
    Contents of "paneltest.aspx"
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.Net.X.IsAjaxRequest)
                this.pnlTest2.Title = "TabPanel 2";
        }
    </script>
    <ext:ResourceManager ID="rm1" runat="server" />
    <ext:Panel ID="pnlTest2" runat="server" AutoScroll="true">
    </ext:Panel>
    Last edited by Daniil; Jun 06, 2014 at 6:29 PM. Reason: [CLOSED]
  2. #2
    Hi @chulcy,

    To load another page into some page you should use Mode="Frame" for a Loader. It renders a page in an iframe.
  3. #3
    Thanks Daniil, that worked!
    Just renewed my support subscription for another year!

    I really don't like the thought of an iframe, is there a better or more preferred way to do this?

    Craig
  4. #4
    Quote Originally Posted by chulcy View Post
    Just renewed my support subscription for another year!
    Had you just 3 posts before renewal? You are just an ideal customer!:)


    Quote Originally Posted by chulcy View Post
    I really don't like the thought of an iframe, is there a better or more preferred way to do this?
    It is a good point. IMO, they should be used only if there is really a very good reason.

    Though, I would say there is no another way to load a full page into another. I would recommend you to consider a possibility to use UserControls.
    https://examples2.ext.net/#/Loaders/...Direct_Method/
    Last edited by Daniil; Jun 06, 2014 at 6:29 PM.

Similar Threads

  1. [CLOSED] desktop ajax loading question
    By susanz in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 02, 2014, 1:08 AM
  2. Loading panel from ajax problem
    By lotjer in forum 2.x Help
    Replies: 11
    Last Post: Sep 03, 2013, 1:45 PM
  3. Ajax Loading Partial Page
    By Iguion in forum 2.x Help
    Replies: 2
    Last Post: Nov 29, 2012, 4:14 PM
  4. TabPanel - loading page resize problem
    By mrozik in forum 1.x Help
    Replies: 5
    Last Post: Dec 04, 2009, 12:52 PM
  5. loading store with ajax codebehind method
    By n_s_adhikari@rediffmail.com in forum 1.x Help
    Replies: 1
    Last Post: Sep 01, 2009, 6:07 AM

Tags for this Thread

Posting Permissions