Nov 17, 2015, 8:27 AM
[OPEN] [#937] [3.2.1] Problem with panel LoadContent and SourceFormatting
I'm experiencing an issue trying to load the content of a panel when SourceFormatting is set to
This is a test page to reproduce the problem:
This is the source of the rendered page. (It looks like there are some extra "\r\n" characters.)
I'm using Ext.NET 3.2.1 and .NET Framework v4.
true
.This is a test page to reproduce the problem:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestExtNet.Default" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
resourceManager.ScriptMode = Ext.Net.ScriptMode.Debug;
resourceManager.SourceFormatting = true;
panelLoader.Loader.Url = "http://ext.net";
panelLoader.LoadContent();
}
</script>
<!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">
<ext:ResourceManager ID="resourceManager" runat="server" />
<title>Test</title>
</head>
<body>
<ext:Viewport runat="server">
<Items>
<ext:Panel ID="panelLoader"
runat="server">
<Loader runat="server" Mode="Frame" DisableCaching="true" AutoLoad="false" />
</ext:Panel>
</Items>
</ext:Viewport>
</body>
</html>
When running this example, Chrome Console reports this error: Uncaught SyntaxError: Unexpected token ILLEGALThis is the source of the rendered page. (It looks like there are some extra "\r\n" characters.)
<!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><title>
Test
</title></head>
<body>
<link type="text/css" rel="stylesheet" href="/extjs/packages/ext_theme_crisp/build/resources/ext-theme-crisp-all-embedded-css/ext.axd?v=19950" id="ext-theme" />
<link type="text/css" rel="stylesheet" href="/extnet/resources/css/extnet-all-debug-embedded-css/ext.axd?v=19950" id="extnet-styles" />
<script type="text/javascript" src="/extjs/ext-all-debug-js/ext.axd?v=19950"></script>
<script type="text/javascript" src="/extjs/packages/ext_theme_crisp/build/ext-theme-crisp-debug-js/ext.axd?v=19950"></script>
<script type="text/javascript" src="/extnet/extnet-all-debug-js/ext.axd?v=19950"></script>
<script type="text/javascript" src="/extnet/locale/ext-locale-it-debug-js/ext.axd?v=19950"></script> <script type="text/javascript">
//<![CDATA[
Ext.net.ResourceMgr.init({
id: "resourceManager",
theme: "crisp",
locale: "it-IT"
});Ext.onReady(function(){Ext.create("Ext.container.Viewport",{
renderTo: Ext.getBody(),
items: [
{
id: "panelLoader",
loader: {
autoLoad: false,
renderer: "frame",
url: "http://ext.net"
}
}
]
});App.panelLoader.load({\r\n "autoLoad": false,\r\n "renderer": "frame",\r\n "url": "http://ext.net"\r\n});});
//]]>
</script>
</body>
</html>
If you set SourceFormatting to false
, the panel loads correctly.I'm using Ext.NET 3.2.1 and .NET Framework v4.
Last edited by Daniil; Nov 17, 2015 at 12:33 PM.
Reason: [OPEN] [#937] [3.2.1]