Aug 11, 2011, 10:06 AM
[CLOSED] Masterpage and BorderLayout
After updating to 1.0/1.1 I am getting the javascript error 'No center region defined in BorderLayout'
It appears that the use of <ext:BorderLayout /> is no longer in favour but I can't get nested border layouts to work with a viewport so that they fill the page using Layout="BorderLayout" for example.
Is there an example of best practice for the use of masterpages with nested border layouts?
Simple example:
Masterpage
It appears that the use of <ext:BorderLayout /> is no longer in favour but I can't get nested border layouts to work with a viewport so that they fill the page using Layout="BorderLayout" for example.
Is there an example of best practice for the use of masterpages with nested border layouts?
Simple example:
Masterpage
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="m.master.vb" Inherits="m" %>
<!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>
<ext:ResourceManager ID="ScriptManager1" runat="server" ScriptMode="Debug" InitScriptMode="Inline" CleanResourceUrl="true" />
</head>
<body>
<ext:ViewPort ID="ViewPort1" runat="server" Layout="BorderLayout">
<Items>
<ext:Panel ID="pnlCenter" runat="server" Region="Center" BodyStyle="background:red;">
<Content>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
</Content>
</ext:Panel>
<ext:Panel ID="pnlWest" runat="server" Region="West" Width="200">
<Content>
West
</Content>
</ext:Panel>
</Items>
</ext:ViewPort>
</body>
</html>
Child page:<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/m.Master" CodeBehind="TestPage.aspx.vb" Inherits="TestPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<ext:BorderLayout runat="server">
<Center>
<ext:Panel runat="server">
<Content>Inner Center</Content>
</ext:Panel>
</Center>
<West>
<ext:Panel runat="server" Width="200">
<Content>Inner West</Content>
</ext:Panel>
</West>
</ext:BorderLayout>
</asp:Content>
Last edited by Daniil; Aug 11, 2011 at 11:37 AM.
Reason: [CLOSED]