PDA

View Full Version : [CLOSED] Master Page + Portal = Ext.Loader is not enabled



jchau
Jul 06, 2012, 7:36 PM
If my content page contains a portal, it throws a javascript error saying Ext.Loader is not enabled and it's trying to load up Ext.app.PortalPanel. I checked with fiddler and the portal js file is getting loaded. If I use a standard page and not a content page, it all works fine.

Vladimir
Jul 07, 2012, 7:17 PM
I cannot reproduce the issue
Can you post your test case?

Here is my test case

Master page:


<%@ Master Language="C#" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" />

<ext:Panel runat="server" Title="Content" Width="300" Height="300" Layout="FitLayout">
<Content>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>
</Content>
</ext:Panel>
</form>
</body>
</html>


Content page:


<%@ Page Title="" Language="C#" MasterPageFile="~/Vlad/Site1.Master" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<ext:Portal runat="server" Border="false">
<Items>
<ext:PortalColumn
runat="server"
Cls="x-column-padding">
<Items>
<ext:Portlet ID="Portlet1" runat="server" Title="Another Panel 1" Icon="Accept" />
</Items>
</ext:PortalColumn>
<ext:PortalColumn
runat="server"
Cls="x-column-padding">
<Items>
<ext:Portlet ID="Portlet2" runat="server" Title="Panel 2" />
<ext:Portlet ID="Portlet3" runat="server" Title="Another Panel 2" />
</Items>
</ext:PortalColumn>
<ext:PortalColumn
runat="server"
Cls="x-column-padding1">
<Items>
<ext:Portlet ID="Portlet4" runat="server" Title="Panel 3" />
<ext:Portlet ID="Portlet5" runat="server" Title="Another Panel 3" />
</Items>
</ext:PortalColumn>
</Items>
</ext:Portal>
</asp:Content>

jchau
Jul 08, 2012, 11:27 PM
I am not able to reproduce with your master page but if you use this master page, you should see the issue:



<body>
<form id="Form1" runat="server">
<ext:ResourceManager runat="server" ID="extResourceManager" ScriptMode="Debug">
</ext:ResourceManager>
<ext:Viewport ID="Viewport1" runat="server">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch">
</ext:VBoxLayoutConfig>
</LayoutConfig>
<Items>
<ext:Container ID="Container1" runat="server" Height="50">
<Content>
Menu Goes Here
</Content>
</ext:Container>
<ext:Container ID="Container2" runat="server">
<Content>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
</Content>
</ext:Container>
</Items>
</ext:Viewport>
</form>
</body>

Vladimir
Jul 09, 2012, 8:59 AM
Thanks for the report. Fixed in SVN

It was copy/paste error in InstanceOf property of Portal class (in my example, Container (inside master page) uses Layout therefore Portal is instantiated as lazy item (by xtype) but in your sample, Layout property is not defined therefore Portal is instantiated through instance name (outside container layout))