[CLOSED] Masterpage and BorderLayout

  1. #1

    [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

    <%@ 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]
  2. #2
    Thanks for the bug report, fixed in svn, please update and retest
  3. #3
    Thanks, that's sorted it.
  4. #4
    This is so amazing! I stumbled upon exactly the same issue about an hour ago. I read this (then still unanswered) question and after checking back a minute or so ago, it got fixed already. That probably saved me a few hours today. Thanks a lot!
  5. #5
    Yes, guys, sorry for that, it was my fault (I commited not tested code)

Similar Threads

  1. Replies: 0
    Last Post: Apr 19, 2012, 3:52 PM
  2. [CLOSED] Ext. Control with MasterPage
    By sisa in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 08, 2011, 4:15 PM
  3. Replies: 1
    Last Post: Jun 08, 2010, 12:51 AM
  4. [CLOSED] Masterpage FitLayout
    By Neil_Walters in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 11, 2010, 11:51 AM
  5. BorderLayout on BorderLayout do not render
    By nanosassa in forum 1.x Help
    Replies: 1
    Last Post: Apr 22, 2009, 4:05 PM

Tags for this Thread

Posting Permissions