[FIXED] [#1155] [4.0] Ext.net.ComponentLoader load mode behavior different than was configured

  1. #1

    [FIXED] [#1155] [4.0] Ext.net.ComponentLoader load mode behavior different than was configured

    I think there's a wrong behaviour in Ext.net.ComponentLoader. It assumes load mode as 'iframe' if the load url contains other domain instead of do what is configured. This is very strange considering the possible use of something like enable cross-origin resource sharing, or even a wrapper around XMLHttpRequest that use window.postMessage to communicate with other domains.

    Here is a example using tooltip:

    Domain 1 (http://localhost:11111):

    ExampleController.cs
    
    using System.Web.Mvc;
    
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Tooltip() => View();
        }
    }
    Tooltip.aspx
    
    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
    </head>
    <body>
        <ext:ResourceManager runat="server" ScriptMode="Debug" />
    
        <div id="ajax-tip" class="tip-target">Ajax ToolTip</div>
    
        <ext:ToolTip
            runat="server"
            Target="ajax-tip"
            Width="200">
            <Loader runat="server" Url="http://localhost:22222/Example/TooltipContent" Mode="Html">
                <LoadMask ShowMask="true" />
            </Loader>
        </ext:ToolTip>
    </body>
    </html>

    Domain 2 (http://localhost:22222):


    ExampleController.cs
    
    using System.Web.Mvc;
    
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult TooltipContent() => Content("<ul><li>Item 1</li><li>Item2</li><li>Item3</li></ul>");
        }
    }
    See that the content of tooltip is loaded inside an iframe.

    Thanks.
    Last edited by Daniil; Dec 10, 2015 at 10:26 AM. Reason: [FIXED] [#1155] [4.0]
  2. #2
    Hi @RCN,

    Thank you for the report!

    Created an Issue:
    https://github.com/extnet/Ext.NET/issues/1155

    A workaround is:
    <Loader ...>
        <CustomConfig>
            <ext:ConfigItem Name="renderer" Value="html" Mode="Value" />
        </CustomConfig>
    </Loader>
  3. #3
    It has been fixed in 4.0 with a small breaking change - Loader's Mode LoadMode type has been changed to LoadMode?.

Similar Threads

  1. Replies: 3
    Last Post: Mar 11, 2015, 7:28 PM
  2. Replies: 6
    Last Post: Jan 13, 2014, 11:47 AM
  3. [CLOSED] GridPanel - select cell, but not in edit mode on load
    By rthiney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 08, 2014, 9:22 PM
  4. Replies: 3
    Last Post: Sep 03, 2013, 6:23 AM
  5. [CLOSED] Remote Load of Nodes and configured filters
    By macap in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 03, 2011, 1:55 PM

Tags for this Thread

Posting Permissions