[CLOSED] Help with autoload merge mode

  1. #1

    [CLOSED] Help with autoload merge mode

    Hi, I'm trying to make an example with AutoLoad Merge
    My example is based on https://examples1.ext.net/#/GridPane...rayWithPaging/

    Default.aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Viewport ID="MainViewport" runat="server" Layout="border">
            <Items>
                <ext:TabPanel ID="etpMain" runat="server" Region="Center" LayoutOnTabChange="true"
                    EnableTabScroll="true" DeferredRender="false" MinTabWidth="85">
                    <Items>
                        <ext:Panel ID="pnlCenter" runat="server" Title="Home" Padding="5">
                            <AutoLoad Url="~/ArrayWithPaging/Default.aspx" Mode="Merge" />
                            <%--<AutoLoad Url="~/ArrayWithPaging/Default.aspx" Mode="IFrame" />--%>
                        </ext:Panel>
                    </Items>
                    <Plugins>
                        <ext:TabCloseMenu ID="TabCloseMenu1" runat="server" />
                    </Plugins>
                </ext:TabPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Default.aspx.cs
    using System;
    
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
    
        }
    }
    In ArrayWithPaging/Default.aspx use
    <ext:ResourceManager ID="ResourceManager2" runat="server" RenderScripts="None" RenderStyles="None" />
    I get following error when I start my sample in Google Chrome:

    Uncaught TypeError: Cannot read property 'PagingStore' of undefined
    (anonymous function)
    h.Event.fireext.axd:221
    v.onDocumentReadyext.axd:3065
    (anonymous function)
    (anonymous function)ext.axd:4034
    Bext.axd:575
    Ext.lib.Event.Fext.axd:597
    in IE8:

    Сообщение: Неизвестная ошибка выполнения
    Строка: 7
    Символ: 81251
    Код: 0
    URI-код: http://localhost:58781/extjs/ext-all-js/ext.axd?v=0
    process in the IE debugger stopped at
    dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"")
    Ext.Net v.1.5.1.0
    Ext.Net.Utilities v.1.3.0.39155

    Please, can you help me with sample

    Best regards,
    Vlad

    PS: in iframe mode all works fine
    Last edited by Daniil; Sep 18, 2012 at 12:27 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi,

    Welcome to Ext.NET!

    In the case with Merge mode, you should manually register these resources. Please call this for the main page.

    Example
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest)
        {
            ResourceManager.RegisterControlResources<GridPanel>();
        }
    }
    Actually, Merge mode is a rather experimental feature. It has some restrictions.

    Please clarify the requirement. Maybe, we could suggest something better.
  3. #3
    Thanks for the quick reply!

    Basic aim is to to translate the existing ext.net project on Tabbed interface like Ext.NET Examples Explorer, but without iframe.

    Best regards,
    Vlad
  4. #4
    Quote Originally Posted by gimala View Post
    Basic aim is to to translate the existing ext.net project on Tabbed interface like Ext.NET Examples Explorer, but without iframe.
    Honestly, I would recommend you to avoid using Merge mode due to the reason mentioned above - it is rather an experimental feature.

    I would prefer to use user controls in WebForm or partial views in MVC.

    Also you can add the tabs on the fly creating them in code behind, like this:
    https://examples1.ext.net/#/XRender/Basic/Add_Items/

    Could you also clarify why do you need to avoid iframes?
    Last edited by Daniil; Sep 15, 2012 at 3:54 PM.

Similar Threads

  1. Grids reload in Merge mode
    By zeus in forum 1.x Help
    Replies: 0
    Last Post: Jul 05, 2012, 7:10 AM
  2. Direct Method Portlet Autoload Mode Merge
    By testix in forum 1.x Help
    Replies: 3
    Last Post: Jan 20, 2012, 1:03 PM
  3. Replies: 2
    Last Post: Mar 19, 2011, 1:17 PM
  4. merge mode refresh
    By testix in forum 1.x Help
    Replies: 1
    Last Post: Jan 10, 2011, 2:03 PM
  5. AutoLoad Merge Mode Issue with IE
    By geniusCoder in forum 1.x Help
    Replies: 1
    Last Post: Nov 05, 2009, 11:53 AM

Tags for this Thread

Posting Permissions