[CLOSED] [1.0] MVC and TabPanel AutoLoad

  1. #1

    [CLOSED] [1.0] MVC and TabPanel AutoLoad

    Hello vladimir,

    Was wondering how I would be able to handle loading the content of a PartialExtView in a TabPanel AutoLoad

    ExampleController.cs:
            public ActionResult Index()
            {
                return View();
            }
    
    public ActionResult Example()
            {
    var result = PartialExtView();
    
    result.RenderMode = RenderMode.RenderTo;
    return result;
            }
    Index.aspx:
    <ext:TabPanel ID="TabPanel1" runat="server">
        <Items>
            <ext:Panel ID="Panel1" runat="server" Title="Tab 1">
                <Content>Word</Content>
            </ext:Panel>
            <ext:Panel ID="Panel2" runat="server" Title="Tab 2">
                <AutoLoad Url="/Example/Example" />
            </ext:Panel>
        </Items>
    </ext:TabPanel>
    Example.ascx:
    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
    <ext:Panel ID="Panel3" runat="server">
        <Content>
            Loaded ...
        </Content>
    </ext:Panel>
    Appreciate your input.

    Cheers,
    Timothy
  2. #2

    RE: [CLOSED] [1.0] MVC and TabPanel AutoLoad

    Hi,

    <ext:Panel ID="Panel2" runat="server" Title="Tab 2">
                    <AutoLoad Url="/Test/Example" Scripts="true">
                    </AutoLoad>
                    <Listeners>
                        <BeforeUpdate Handler="e.url.params={containerId : this.body.id};" />
                    </Listeners>
                </ext:Panel>
    Controller: Mode - RenderTo, WrapByScriptsTag=true

    May be I should to think about more convenience method to pass panel's id or body's id
  3. #3

    RE: [CLOSED] [1.0] MVC and TabPanel AutoLoad

    Thanks vladimir, would be nice to have!

    Cheers
  4. #4

    RE: [CLOSED] [1.0] MVC and TabPanel AutoLoad

    Hi,

    Now you can use functions as autoload parameter. Function will be called with current container scope (you can use #() syntax)

    <ext:Panel ID="Panel1" runat="server" Width="300" Height="200" Title="IFrame">
                <AutoLoad Url="Body.aspx" Mode="IFrame">
                    <Params>
                        <ext:Parameter Name="id" Value="#(return this.id;)" />
                    </Params>
                </AutoLoad>
            </ext:Panel>
            
            <ext:Panel ID="Panel2" runat="server" Width="300" Height="200" Title="Merge">
                <AutoLoad Url="Body.aspx">
                    <Params>
                        <ext:Parameter Name="bodyId" Value="function(){return this.body.id;}" />
                    </Params>
                </AutoLoad>
            </ext:Panel>

Similar Threads

  1. [CLOSED] TabPanel Autoload problem
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 14, 2011, 9:41 AM
  2. [CLOSED] [1.0] TabPanel reload AutoLoad
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 09, 2011, 9:33 PM
  3. [CLOSED] [1.0] TabPanel AutoLoad with IE 7/8 on Windows XP
    By rcaunt in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 16, 2010, 12:34 PM
  4. Tabpanel - Autoload slow?
    By Tbaseflug in forum 1.x Help
    Replies: 5
    Last Post: Jun 26, 2009, 12:10 PM
  5. AutoLoad is missing in TabPanel
    By koresx in forum 1.x Help
    Replies: 1
    Last Post: Dec 30, 2008, 5:24 AM

Posting Permissions