Jun 18, 2014, 6:54 PM
[CLOSED] Error on destroy ext.window IE11
I have a window with closeAction set to 'destroy'. When the window is closed, an exception is thrown on IE 11, as shown below:
SCRIPT5007: Unable to get value of the property 'app' object is null or undefined
File: Index2 Line: 515 Column: 9
ExampleController.cs
SCRIPT5007: Unable to get value of the property 'app' object is null or undefined
File: Index2 Line: 515 Column: 9
ExampleController.cs
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult Index2()
{
FormPanel frm = new FormPanel();
frm.FieldDefaults.LabelAlign = LabelAlign.Top;
FileUploadField fuf = new FileUploadField();
Button _btnClose = new Button
{
Text = "Close"
};
_btnClose.Listeners.Click.Handler = "parentAutoLoadControl.close();";
Toolbar tbar = new Toolbar();
tbar.Items.Add(_btnClose);
frm.TopBar.Add(tbar);
ViewBag.Content = ComponentLoader.ToConfig(frm);
return View();
}
public ActionResult Index3()
{
return View();
}
}
Index2.aspx<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<%--Conte?do da Aplica??o--%>
<ext:Hidden ID="_hdnContent" Text="<%# ViewBag.Content %>"
AutoDataBind="true" runat="server" />
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="_vwp1" Layout="FitLayout" Border="false" runat="server" />
<script type="text/javascript">
Ext.onReady(function () {
App._vwp1.add(Ext.decode(App._hdnContent.value, true));
App._hdnContent.destroy();
});
</script>
</body>
</html>
Index3.aspx<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Index3</title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<script type="text/javascript">
Ext.onReady(function () {
var wdw = new Ext.Window(
{
width: 400,
height: 400,
closable: false,
modal: true,
closeAction: "destroy",
loader: {
renderer: "frame",
url: Ext.net.ResourceMgr.resolveUrl("~/Example/Index2"),
loadMask: {
showMask: true
}
}
});
wdw.show();
});
</script>
</body>
</html>
Last edited by Daniil; Jun 24, 2014 at 2:14 PM.
Reason: [CLOSED]