I have a masterpage with a viewport and content page with borderlayout. In the content page, I also have a store outside the borderlayout and a grid inside the borderlayout. When the page loads, JS error saying store not defined. This is because the store is created AFTER the borderlayout is created. If I move the store to my masterpage and place it outside the viewport, it's fine. However, the store is unique to the content page and should not be in masterpage. My only alternative right now is to add another contentplaceholder outside the viewport and put the store there. Just wondering if there's a better solution.

Please also tell me if all this Viewport-->BorderLayout-->Panel-->BorderLayout-->More Content is inefficient. I can't find another way to have my contentform resize correctly. This is a VERY simplified version of my production code. In production, the masterpage's borderlayout contains a North and South region so having a borderlayout is necessary but I am not sure how to get rid of the Panel-->BorderLayout in the contentform. I tried using a FitLayout but that didn't work.

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!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">
    <asp:ContentPlaceHolder ID="head" runat="server">
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server">

    <ext:ViewPort runat="server">
            <ext:BorderLayout runat="server">
                <Center MarginsSummary="5">                
                    <ext:Panel runat="server" Border="false">
                            <asp:ContentPlaceHolder runat="server" ID="c">
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="c" runat="server">
    <ext:Store ID="storeSuppliers" runat="server">
                    <ext:RecordField Name="CompanyName">
    <ext:BorderLayout runat="server">
            <ext:GridPanel runat="server" ID="gridSuppliers" StoreID="storeSuppliers">
                <ColumnModel runat="server">
                        <ext:Column DataIndex="CompanyName" Header="Company Name">