Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / Container.html
index c8c7f5d..97ae671 100644 (file)
+<!DOCTYPE html>
 <html>
 <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+  <style type="text/css">
+    .highlight { display: block; background-color: #ddd; }
+  </style>
+  <script type="text/javascript">
+    function highlight() {
+      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+    }
+  </script>
 </head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
+<body onload="prettyPrint(); highlight();">
+  <pre class="prettyprint lang-js"><span id='Ext-container-Container'>/**
+</span> * Base class for any Ext.Component that may contain other Components. Containers handle the basic behavior of
+ * containing items, namely adding, inserting and removing items.
+ *
+ * The most commonly used Container classes are Ext.panel.Panel, Ext.window.Window and
+ * Ext.tab.Panel. If you do not need the capabilities offered by the aforementioned classes you can create a
+ * lightweight Container to be encapsulated by an HTML element to your specifications by using the
+ * {@link Ext.Component#autoEl autoEl} config option.
+ *
+ * The code below illustrates how to explicitly create a Container:
+ *
+ *     @example
+ *     // Explicitly create a Container
+ *     Ext.create('Ext.container.Container', {
+ *         layout: {
+ *             type: 'hbox'
+ *         },
+ *         width: 400,
+ *         renderTo: Ext.getBody(),
+ *         border: 1,
+ *         style: {borderColor:'#000000', borderStyle:'solid', borderWidth:'1px'},
+ *         defaults: {
+ *             labelWidth: 80,
+ *             // implicitly create Container by specifying xtype
+ *             xtype: 'datefield',
+ *             flex: 1,
+ *             style: {
+ *                 padding: '10px'
+ *             }
+ *         },
+ *         items: [{
+ *             xtype: 'datefield',
+ *             name: 'startDate',
+ *             fieldLabel: 'Start date'
+ *         },{
+ *             xtype: 'datefield',
+ *             name: 'endDate',
+ *             fieldLabel: 'End date'
+ *         }]
+ *     });
+ *
+ * ## Layout
+ *
+ * Container classes delegate the rendering of child Components to a layout manager class which must be configured into
+ * the Container using the `{@link #layout}` configuration property.
+ *
+ * When either specifying child `{@link #items}` of a Container, or dynamically {@link #add adding} Components to a
+ * Container, remember to consider how you wish the Container to arrange those child elements, and whether those child
+ * elements need to be sized using one of Ext's built-in `{@link #layout}` schemes. By default, Containers use the
+ * {@link Ext.layout.container.Auto Auto} scheme which only renders child components, appending them one after the other
+ * inside the Container, and **does not apply any sizing** at all.
+ *
+ * A common mistake is when a developer neglects to specify a `{@link #layout}` (e.g. widgets like GridPanels or
+ * TreePanels are added to Containers for which no `{@link #layout}` has been specified). If a Container is left to
+ * use the default {@link Ext.layout.container.Auto Auto} scheme, none of its child components will be resized, or changed in
+ * any way when the Container is resized.
+ *
+ * Certain layout managers allow dynamic addition of child components. Those that do include
+ * Ext.layout.container.Card, Ext.layout.container.Anchor, Ext.layout.container.VBox,
+ * Ext.layout.container.HBox, and Ext.layout.container.Table. For example:
+ *
+ *     //  Create the GridPanel.
+ *     var myNewGrid = new Ext.grid.Panel({
+ *         store: myStore,
+ *         headers: myHeaders,
+ *         title: 'Results', // the title becomes the title of the tab
+ *     });
+ *
+ *     myTabPanel.add(myNewGrid); // {@link Ext.tab.Panel} implicitly uses {@link Ext.layout.container.Card Card}
+ *     myTabPanel.{@link Ext.tab.Panel#setActiveTab setActiveTab}(myNewGrid);
+ *
+ * The example above adds a newly created GridPanel to a TabPanel. Note that a TabPanel uses {@link
+ * Ext.layout.container.Card} as its layout manager which means all its child items are sized to {@link
+ * Ext.layout.container.Fit fit} exactly into its client area.
+ *
+ * **_Overnesting is a common problem_**. An example of overnesting occurs when a GridPanel is added to a TabPanel by
+ * wrapping the GridPanel _inside_ a wrapping Panel (that has no `{@link #layout}` specified) and then add that
+ * wrapping Panel to the TabPanel. The point to realize is that a GridPanel **is** a Component which can be added
+ * directly to a Container. If the wrapping Panel has no `{@link #layout}` configuration, then the overnested
+ * GridPanel will not be sized as expected.
+ *
+ * ## Adding via remote configuration
+ *
+ * A server side script can be used to add Components which are generated dynamically on the server. An example of
+ * adding a GridPanel to a TabPanel where the GridPanel is generated by the server based on certain parameters:
+ *
+ *     // execute an Ajax request to invoke server side script:
+ *     Ext.Ajax.request({
+ *         url: 'gen-invoice-grid.php',
+ *         // send additional parameters to instruct server script
+ *         params: {
+ *             startDate: Ext.getCmp('start-date').getValue(),
+ *             endDate: Ext.getCmp('end-date').getValue()
+ *         },
+ *         // process the response object to add it to the TabPanel:
+ *         success: function(xhr) {
+ *             var newComponent = eval(xhr.responseText); // see discussion below
+ *             myTabPanel.add(newComponent); // add the component to the TabPanel
+ *             myTabPanel.setActiveTab(newComponent);
+ *         },
+ *         failure: function() {
+ *             Ext.Msg.alert(&quot;Grid create failed&quot;, &quot;Server communication failure&quot;);
+ *         }
+ *     });
+ *
+ * The server script needs to return a JSON representation of a configuration object, which, when decoded will return a
+ * config object with an {@link Ext.Component#xtype xtype}. The server might return the following JSON:
+ *
+ *     {
+ *         &quot;xtype&quot;: 'grid',
+ *         &quot;title&quot;: 'Invoice Report',
+ *         &quot;store&quot;: {
+ *             &quot;model&quot;: 'Invoice',
+ *             &quot;proxy&quot;: {
+ *                 &quot;type&quot;: 'ajax',
+ *                 &quot;url&quot;: 'get-invoice-data.php',
+ *                 &quot;reader&quot;: {
+ *                     &quot;type&quot;: 'json'
+ *                     &quot;record&quot;: 'transaction',
+ *                     &quot;idProperty&quot;: 'id',
+ *                     &quot;totalRecords&quot;: 'total'
+ *                 })
+ *             },
+ *             &quot;autoLoad&quot;: {
+ *                 &quot;params&quot;: {
+ *                     &quot;startDate&quot;: '01/01/2008',
+ *                     &quot;endDate&quot;: '01/31/2008'
+ *                 }
+ *             }
+ *         },
+ *         &quot;headers&quot;: [
+ *             {&quot;header&quot;: &quot;Customer&quot;, &quot;width&quot;: 250, &quot;dataIndex&quot;: 'customer', &quot;sortable&quot;: true},
+ *             {&quot;header&quot;: &quot;Invoice Number&quot;, &quot;width&quot;: 120, &quot;dataIndex&quot;: 'invNo', &quot;sortable&quot;: true},
+ *             {&quot;header&quot;: &quot;Invoice Date&quot;, &quot;width&quot;: 100, &quot;dataIndex&quot;: 'date', &quot;renderer&quot;: Ext.util.Format.dateRenderer('M d, y'), &quot;sortable&quot;: true},
+ *             {&quot;header&quot;: &quot;Value&quot;, &quot;width&quot;: 120, &quot;dataIndex&quot;: 'value', &quot;renderer&quot;: 'usMoney', &quot;sortable&quot;: true}
+ *         ]
+ *     }
+ *
+ * When the above code fragment is passed through the `eval` function in the success handler of the Ajax request, the
+ * result will be a config object which, when added to a Container, will cause instantiation of a GridPanel. **Be sure
+ * that the Container is configured with a layout which sizes and positions the child items to your requirements.**
+ *
+ * **Note:** since the code above is _generated_ by a server script, the `autoLoad` params for the Store, the user's
+ * preferred date format, the metadata to allow generation of the Model layout, and the ColumnModel can all be generated
+ * into the code since these are all known on the server.
  */
-<div id="cls-Ext.Container"></div>/**\r
- * @class Ext.Container\r
- * @extends Ext.BoxComponent\r
- * <p>Base class for any {@link Ext.BoxComponent} that may contain other Components. Containers handle the\r
- * basic behavior of containing items, namely adding, inserting and removing items.</p>\r
- *\r
- * <p>The most commonly used Container classes are {@link Ext.Panel}, {@link Ext.Window} and {@link Ext.TabPanel}.\r
- * If you do not need the capabilities offered by the aforementioned classes you can create a lightweight\r
- * Container to be encapsulated by an HTML element to your specifications by using the\r
- * <tt><b>{@link Ext.Component#autoEl autoEl}</b></tt> config option. This is a useful technique when creating\r
- * embedded {@link Ext.layout.ColumnLayout column} layouts inside {@link Ext.form.FormPanel FormPanels}\r
- * for example.</p>\r
- *\r
- * <p>The code below illustrates both how to explicitly create a Container, and how to implicitly\r
- * create one using the <b><tt>'container'</tt></b> xtype:<pre><code>\r
-// explicitly create a Container\r
-var embeddedColumns = new Ext.Container({\r
-    autoEl: 'div',  // This is the default\r
-    layout: 'column',\r
-    defaults: {\r
-        // implicitly create Container by specifying xtype\r
-        xtype: 'container',\r
-        autoEl: 'div', // This is the default.\r
-        layout: 'form',\r
-        columnWidth: 0.5,\r
-        style: {\r
-            padding: '10px'\r
-        }\r
-    },\r
-//  The two items below will be Ext.Containers, each encapsulated by a &lt;DIV> element.\r
-    items: [{\r
-        items: {\r
-            xtype: 'datefield',\r
-            name: 'startDate',\r
-            fieldLabel: 'Start date'\r
-        }\r
-    }, {\r
-        items: {\r
-            xtype: 'datefield',\r
-            name: 'endDate',\r
-            fieldLabel: 'End date'\r
-        }\r
-    }]\r
-});</code></pre></p>\r
- *\r
- * <p><u><b>Layout</b></u></p>\r
- * <p>Container classes delegate the rendering of child Components to a layout\r
- * manager class which must be configured into the Container using the\r
- * <code><b>{@link #layout}</b></code> configuration property.</p>\r
- * <p>When either specifying child <code>{@link #items}</code> of a Container,\r
- * or dynamically {@link #add adding} Components to a Container, remember to\r
- * consider how you wish the Container to arrange those child elements, and\r
- * whether those child elements need to be sized using one of Ext's built-in\r
- * <b><code>{@link #layout}</code></b> schemes. By default, Containers use the\r
- * {@link Ext.layout.ContainerLayout ContainerLayout} scheme which only\r
- * renders child components, appending them one after the other inside the\r
- * Container, and <b>does not apply any sizing</b> at all.</p>\r
- * <p>A common mistake is when a developer neglects to specify a\r
- * <b><code>{@link #layout}</code></b> (e.g. widgets like GridPanels or\r
- * TreePanels are added to Containers for which no <tt><b>{@link #layout}</b></tt>\r
- * has been specified). If a Container is left to use the default\r
- * {@link Ext.layout.ContainerLayout ContainerLayout} scheme, none of its\r
- * child components will be resized, or changed in any way when the Container\r
- * is resized.</p>\r
- * <p>Certain layout managers allow dynamic addition of child components.\r
- * Those that do include {@link Ext.layout.CardLayout},\r
- * {@link Ext.layout.AnchorLayout}, {@link Ext.layout.FormLayout}, and\r
- * {@link Ext.layout.TableLayout}. For example:<pre><code>\r
-//  Create the GridPanel.\r
-var myNewGrid = new Ext.grid.GridPanel({\r
-    store: myStore,\r
-    columns: myColumnModel,\r
-    title: 'Results', // the title becomes the title of the tab\r
-});\r
-\r
-myTabPanel.add(myNewGrid); // {@link Ext.TabPanel} implicitly uses {@link Ext.layout.CardLayout CardLayout}\r
-myTabPanel.{@link Ext.TabPanel#setActiveTab setActiveTab}(myNewGrid);\r
- * </code></pre></p>\r
- * <p>The example above adds a newly created GridPanel to a TabPanel. Note that\r
- * a TabPanel uses {@link Ext.layout.CardLayout} as its layout manager which\r
- * means all its child items are sized to {@link Ext.layout.FitLayout fit}\r
- * exactly into its client area.\r
- * <p><b><u>Overnesting is a common problem</u></b>.\r
- * An example of overnesting occurs when a GridPanel is added to a TabPanel\r
- * by wrapping the GridPanel <i>inside</i> a wrapping Panel (that has no\r
- * <tt><b>{@link #layout}</b></tt> specified) and then add that wrapping Panel\r
- * to the TabPanel. The point to realize is that a GridPanel <b>is</b> a\r
- * Component which can be added directly to a Container. If the wrapping Panel\r
- * has no <tt><b>{@link #layout}</b></tt> configuration, then the overnested\r
- * GridPanel will not be sized as expected.<p>\r
- *\r
- * <p><u><b>Adding via remote configuration</b></u></p>\r
- *\r
- * <p>A server side script can be used to add Components which are generated dynamically on the server.\r
- * An example of adding a GridPanel to a TabPanel where the GridPanel is generated by the server\r
- * based on certain parameters:\r
- * </p><pre><code>\r
-// execute an Ajax request to invoke server side script:\r
-Ext.Ajax.request({\r
-    url: 'gen-invoice-grid.php',\r
-    // send additional parameters to instruct server script\r
-    params: {\r
-        startDate: Ext.getCmp('start-date').getValue(),\r
-        endDate: Ext.getCmp('end-date').getValue()\r
-    },\r
-    // process the response object to add it to the TabPanel:\r
-    success: function(xhr) {\r
-        var newComponent = eval(xhr.responseText); // see discussion below\r
-        myTabPanel.add(newComponent); // add the component to the TabPanel\r
-        myTabPanel.setActiveTab(newComponent);\r
-    },\r
-    failure: function() {\r
-        Ext.Msg.alert("Grid create failed", "Server communication failure");\r
-    }\r
-});\r
-</code></pre>\r
- * <p>The server script needs to return an executable Javascript statement which, when processed\r
- * using <tt>eval()</tt>, will return either a config object with an {@link Ext.Component#xtype xtype},\r
- * or an instantiated Component. The server might return this for example:</p><pre><code>\r
-(function() {\r
-    function formatDate(value){\r
-        return value ? value.dateFormat('M d, Y') : '';\r
-    };\r
-\r
-    var store = new Ext.data.Store({\r
-        url: 'get-invoice-data.php',\r
-        baseParams: {\r
-            startDate: '01/01/2008',\r
-            endDate: '01/31/2008'\r
-        },\r
-        reader: new Ext.data.JsonReader({\r
-            record: 'transaction',\r
-            idProperty: 'id',\r
-            totalRecords: 'total'\r
-        }, [\r
-           'customer',\r
-           'invNo',\r
-           {name: 'date', type: 'date', dateFormat: 'm/d/Y'},\r
-           {name: 'value', type: 'float'}\r
-        ])\r
-    });\r
-\r
-    var grid = new Ext.grid.GridPanel({\r
-        title: 'Invoice Report',\r
-        bbar: new Ext.PagingToolbar(store),\r
-        store: store,\r
-        columns: [\r
-            {header: "Customer", width: 250, dataIndex: 'customer', sortable: true},\r
-            {header: "Invoice Number", width: 120, dataIndex: 'invNo', sortable: true},\r
-            {header: "Invoice Date", width: 100, dataIndex: 'date', renderer: formatDate, sortable: true},\r
-            {header: "Value", width: 120, dataIndex: 'value', renderer: 'usMoney', sortable: true}\r
-        ],\r
-    });\r
-    store.load();\r
-    return grid;  // return instantiated component\r
-})();\r
-</code></pre>\r
- * <p>When the above code fragment is passed through the <tt>eval</tt> function in the success handler\r
- * of the Ajax request, the code is executed by the Javascript processor, and the anonymous function\r
- * runs, and returns the instantiated grid component.</p>\r
- * <p>Note: since the code above is <i>generated</i> by a server script, the <tt>baseParams</tt> for\r
- * the Store, the metadata to allow generation of the Record layout, and the ColumnModel\r
- * can all be generated into the code since these are all known on the server.</p>\r
- *\r
- * @xtype container\r
- */\r
-Ext.Container = Ext.extend(Ext.BoxComponent, {\r
-    <div id="cfg-Ext.Container-monitorResize"></div>/**\r
-     * @cfg {Boolean} monitorResize\r
-     * True to automatically monitor window resize events to handle anything that is sensitive to the current size\r
-     * of the viewport.  This value is typically managed by the chosen <code>{@link #layout}</code> and should not need\r
-     * to be set manually.\r
-     */\r
-    <div id="cfg-Ext.Container-layout"></div>/**\r
-     * @cfg {String/Object} layout\r
-     * <p><b>*Important</b>: In order for child items to be correctly sized and\r
-     * positioned, typically a layout manager <b>must</b> be specified through\r
-     * the <code>layout</code> configuration option.</p>\r
-     * <br><p>The sizing and positioning of child {@link items} is the responsibility of\r
-     * the Container's layout manager which creates and manages the type of layout\r
-     * you have in mind.  For example:</p><pre><code>\r
-new Ext.Window({\r
-    width:300, height: 300,\r
-    layout: 'fit', // explicitly set layout manager: override the default (layout:'auto')\r
-    items: [{\r
-        title: 'Panel inside a Window'\r
-    }]\r
-}).show();\r
-     * </code></pre>\r
-     * <p>If the {@link #layout} configuration is not explicitly specified for\r
-     * a general purpose container (e.g. Container or Panel) the\r
-     * {@link Ext.layout.ContainerLayout default layout manager} will be used\r
-     * which does nothing but render child components sequentially into the\r
-     * Container (no sizing or positioning will be performed in this situation).\r
-     * Some container classes implicitly specify a default layout\r
-     * (e.g. FormPanel specifies <code>layout:'form'</code>). Other specific\r
-     * purpose classes internally specify/manage their internal layout (e.g.\r
-     * GridPanel, TabPanel, TreePanel, Toolbar, Menu, etc.).</p>\r
-     * <br><p><b><code>layout</code></b> may be specified as either as an Object or\r
-     * as a String:</p><div><ul class="mdetail-params">\r
-     *\r
-     * <li><u>Specify as an Object</u></li>\r
-     * <div><ul class="mdetail-params">\r
-     * <li>Example usage:</li>\r
-<pre><code>\r
-layout: {\r
-    type: 'vbox',\r
-    padding: '5',\r
-    align: 'left'\r
-}\r
-</code></pre>\r
-     *\r
-     * <li><tt><b>type</b></tt></li>\r
-     * <br/><p>The layout type to be used for this container.  If not specified,\r
-     * a default {@link Ext.layout.ContainerLayout} will be created and used.</p>\r
-     * <br/><p>Valid layout <tt>type</tt> values are:</p>\r
-     * <div class="sub-desc"><ul class="mdetail-params">\r
-     * <li><tt><b>{@link Ext.layout.AbsoluteLayout absolute}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.AccordionLayout accordion}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.AnchorLayout anchor}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.ContainerLayout auto}</b></tt> &nbsp;&nbsp;&nbsp; <b>Default</b></li>\r
-     * <li><tt><b>{@link Ext.layout.BorderLayout border}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.CardLayout card}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.ColumnLayout column}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.FitLayout fit}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.FormLayout form}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.HBoxLayout hbox}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.MenuLayout menu}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.TableLayout table}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.ToolbarLayout toolbar}</b></tt></li>\r
-     * <li><tt><b>{@link Ext.layout.VBoxLayout vbox}</b></tt></li>\r
-     * </ul></div>\r
-     *\r
-     * <li>Layout specific configuration properties</li>\r
-     * <br/><p>Additional layout specific configuration properties may also be\r
-     * specified. For complete details regarding the valid config options for\r
-     * each layout type, see the layout class corresponding to the <tt>type</tt>\r
-     * specified.</p>\r
-     *\r
-     * </ul></div>\r
-     *\r
-     * <li><u>Specify as a String</u></li>\r
-     * <div><ul class="mdetail-params">\r
-     * <li>Example usage:</li>\r
-<pre><code>\r
-layout: 'vbox',\r
-layoutConfig: {\r
-    padding: '5',\r
-    align: 'left'\r
-}\r
-</code></pre>\r
-     * <li><tt><b>layout</b></tt></li>\r
-     * <br/><p>The layout <tt>type</tt> to be used for this container (see list\r
-     * of valid layout type values above).</p><br/>\r
-     * <li><tt><b>{@link #layoutConfig}</b></tt></li>\r
-     * <br/><p>Additional layout specific configuration properties. For complete\r
-     * details regarding the valid config options for each layout type, see the\r
-     * layout class corresponding to the <tt>layout</tt> specified.</p>\r
-     * </ul></div></ul></div>\r
-     */\r
-    <div id="cfg-Ext.Container-layoutConfig"></div>/**\r
-     * @cfg {Object} layoutConfig\r
-     * This is a config object containing properties specific to the chosen\r
-     * <b><code>{@link #layout}</code></b> if <b><code>{@link #layout}</code></b>\r
-     * has been specified as a <i>string</i>.</p>\r
-     */\r
-    <div id="cfg-Ext.Container-bufferResize"></div>/**\r
-     * @cfg {Boolean/Number} bufferResize\r
-     * When set to true (50 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer\r
-     * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers\r
-     * with a large quantity of sub-components for which frequent layout calls would be expensive. Defaults to <tt>50</tt>.\r
-     */\r
-    bufferResize: 50,\r
-\r
-    <div id="cfg-Ext.Container-activeItem"></div>/**\r
-     * @cfg {String/Number} activeItem\r
-     * A string component id or the numeric index of the component that should be initially activated within the\r
-     * container's layout on render.  For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first\r
-     * item in the container's collection).  activeItem only applies to layout styles that can display\r
-     * items one at a time (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout} and\r
-     * {@link Ext.layout.FitLayout}).  Related to {@link Ext.layout.ContainerLayout#activeItem}.\r
-     */\r
-    <div id="cfg-Ext.Container-items"></div>/**\r
-     * @cfg {Object/Array} items\r
-     * <pre><b>** IMPORTANT</b>: be sure to <b>{@link #layout specify a <code>layout</code>} if needed ! **</b></pre>\r
-     * <p>A single item, or an array of child Components to be added to this container,\r
-     * for example:</p>\r
-     * <pre><code>\r
-// specifying a single item\r
-items: {...},\r
-layout: 'fit',    // specify a layout!\r
-\r
-// specifying multiple items\r
-items: [{...}, {...}],\r
-layout: 'anchor', // specify a layout!\r
-     * </code></pre>\r
-     * <p>Each item may be:</p>\r
-     * <div><ul class="mdetail-params">\r
-     * <li>any type of object based on {@link Ext.Component}</li>\r
-     * <li>a fully instanciated object or</li>\r
-     * <li>an object literal that:</li>\r
-     * <div><ul class="mdetail-params">\r
-     * <li>has a specified <code>{@link Ext.Component#xtype xtype}</code></li>\r
-     * <li>the {@link Ext.Component#xtype} specified is associated with the Component\r
-     * desired and should be chosen from one of the available xtypes as listed\r
-     * in {@link Ext.Component}.</li>\r
-     * <li>If an <code>{@link Ext.Component#xtype xtype}</code> is not explicitly\r
-     * specified, the {@link #defaultType} for that Container is used.</li>\r
-     * <li>will be "lazily instanciated", avoiding the overhead of constructing a fully\r
-     * instanciated Component object</li>\r
-     * </ul></div></ul></div>\r
-     * <p><b>Notes</b>:</p>\r
-     * <div><ul class="mdetail-params">\r
-     * <li>Ext uses lazy rendering. Child Components will only be rendered\r
-     * should it become necessary. Items are automatically laid out when they are first\r
-     * shown (no sizing is done while hidden), or in response to a {@link #doLayout} call.</li>\r
-     * <li>Do not specify <code>{@link Ext.Panel#contentEl contentEl}</code>/\r
-     * <code>{@link Ext.Panel#html html}</code> with <code>items</code>.</li>\r
-     * </ul></div>\r
-     */\r
-    <div id="cfg-Ext.Container-defaults"></div>/**\r
-     * @cfg {Object} defaults\r
-     * <p>A config object that will be applied to all components added to this container either via the {@link #items}\r
-     * config or via the {@link #add} or {@link #insert} methods.  The <tt>defaults</tt> config can contain any\r
-     * number of name/value property pairs to be added to each item, and should be valid for the types of items\r
-     * being added to the container.  For example, to automatically apply padding to the body of each of a set of\r
-     * contained {@link Ext.Panel} items, you could pass: <tt>defaults: {bodyStyle:'padding:15px'}</tt>.</p><br/>\r
-     * <p><b>Note</b>: <tt>defaults</tt> will not be applied to config objects if the option is already specified.\r
-     * For example:</p><pre><code>\r
-defaults: {               // defaults are applied to items, not the container\r
-    autoScroll:true\r
-},\r
-items: [\r
-    {\r
-        xtype: 'panel',   // defaults <b>do not</b> have precedence over\r
-        id: 'panel1',     // options in config objects, so the defaults\r
-        autoScroll: false // will not be applied here, panel1 will be autoScroll:false\r
-    },\r
-    new Ext.Panel({       // defaults <b>do</b> have precedence over options\r
-        id: 'panel2',     // options in components, so the defaults\r
-        autoScroll: false // will be applied here, panel2 will be autoScroll:true.\r
-    })\r
-]\r
-     * </code></pre>\r
-     */\r
-\r
-\r
-    <div id="cfg-Ext.Container-autoDestroy"></div>/** @cfg {Boolean} autoDestroy\r
-     * If true the container will automatically destroy any contained component that is removed from it, else\r
-     * destruction must be handled manually (defaults to true).\r
-     */\r
-    autoDestroy : true,\r
-\r
-    <div id="cfg-Ext.Container-forceLayout"></div>/** @cfg {Boolean} forceLayout\r
-     * If true the container will force a layout initially even if hidden or collapsed. This option\r
-     * is useful for forcing forms to render in collapsed or hidden containers. (defaults to false).\r
-     */\r
-    forceLayout: false,\r
-\r
-    <div id="cfg-Ext.Container-hideBorders"></div>/** @cfg {Boolean} hideBorders\r
-     * True to hide the borders of each contained component, false to defer to the component's existing\r
-     * border settings (defaults to false).\r
-     */\r
-    <div id="cfg-Ext.Container-defaultType"></div>/** @cfg {String} defaultType\r
-     * <p>The default {@link Ext.Component xtype} of child Components to create in this Container when\r
-     * a child item is specified as a raw configuration object, rather than as an instantiated Component.</p>\r
-     * <p>Defaults to <tt>'panel'</tt>, except {@link Ext.menu.Menu} which defaults to <tt>'menuitem'</tt>,\r
-     * and {@link Ext.Toolbar} and {@link Ext.ButtonGroup} which default to <tt>'button'</tt>.</p>\r
-     */\r
-    defaultType : 'panel',\r
-\r
-    <div id="cfg-Ext.Container-resizeEvent"></div>/** @cfg {String} resizeEvent\r
-     * The event to listen to for resizing in layouts. Defaults to <tt>'resize'</tt>.\r
-     */\r
-    resizeEvent: 'resize',\r
-    \r
-    <div id="cfg-Ext.Container-bubbleEvents"></div>/**\r
-     * @cfg {Array} bubbleEvents\r
-     * <p>An array of events that, when fired, should be bubbled to any parent container.\r
-     * Defaults to <tt>['add', 'remove']</tt>.\r
-     */\r
-    bubbleEvents: ['add', 'remove'],\r
-\r
-    // private\r
-    initComponent : function(){\r
-        Ext.Container.superclass.initComponent.call(this);\r
-\r
-        this.addEvents(\r
-            <div id="event-Ext.Container-afterlayout"></div>/**\r
-             * @event afterlayout\r
-             * Fires when the components in this container are arranged by the associated layout manager.\r
-             * @param {Ext.Container} this\r
-             * @param {ContainerLayout} layout The ContainerLayout implementation for this container\r
-             */\r
-            'afterlayout',\r
-            <div id="event-Ext.Container-beforeadd"></div>/**\r
-             * @event beforeadd\r
-             * Fires before any {@link Ext.Component} is added or inserted into the container.\r
-             * A handler can return false to cancel the add.\r
-             * @param {Ext.Container} this\r
-             * @param {Ext.Component} component The component being added\r
-             * @param {Number} index The index at which the component will be added to the container's items collection\r
-             */\r
-            'beforeadd',\r
-            <div id="event-Ext.Container-beforeremove"></div>/**\r
-             * @event beforeremove\r
-             * Fires before any {@link Ext.Component} is removed from the container.  A handler can return\r
-             * false to cancel the remove.\r
-             * @param {Ext.Container} this\r
-             * @param {Ext.Component} component The component being removed\r
-             */\r
-            'beforeremove',\r
-            <div id="event-Ext.Container-add"></div>/**\r
-             * @event add\r
-             * @bubbles\r
-             * Fires after any {@link Ext.Component} is added or inserted into the container.\r
-             * @param {Ext.Container} this\r
-             * @param {Ext.Component} component The component that was added\r
-             * @param {Number} index The index at which the component was added to the container's items collection\r
-             */\r
-            'add',\r
-            <div id="event-Ext.Container-remove"></div>/**\r
-             * @event remove\r
-             * @bubbles\r
-             * Fires after any {@link Ext.Component} is removed from the container.\r
-             * @param {Ext.Container} this\r
-             * @param {Ext.Component} component The component that was removed\r
-             */\r
-            'remove'\r
-        );\r
-\r
-        this.enableBubble(this.bubbleEvents);\r
-\r
-        <div id="prop-Ext.Container-items"></div>/**\r
-         * The collection of components in this container as a {@link Ext.util.MixedCollection}\r
-         * @type MixedCollection\r
-         * @property items\r
-         */\r
-        var items = this.items;\r
-        if(items){\r
-            delete this.items;\r
-            this.add(items);\r
-        }\r
-    },\r
-\r
-    // private\r
-    initItems : function(){\r
-        if(!this.items){\r
-            this.items = new Ext.util.MixedCollection(false, this.getComponentId);\r
-            this.getLayout(); // initialize the layout\r
-        }\r
-    },\r
-\r
-    // private\r
-    setLayout : function(layout){\r
-        if(this.layout && this.layout != layout){\r
-            this.layout.setContainer(null);\r
-        }\r
-        this.initItems();\r
-        this.layout = layout;\r
-        layout.setContainer(this);\r
-    },\r
-\r
-    afterRender: function(){\r
-        Ext.Container.superclass.afterRender.call(this);\r
-        if(!this.layout){\r
-            this.layout = 'auto';\r
-        }\r
-        if(Ext.isObject(this.layout) && !this.layout.layout){\r
-            this.layoutConfig = this.layout;\r
-            this.layout = this.layoutConfig.type;\r
-        }\r
-        if(Ext.isString(this.layout)){\r
-            this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig);\r
-        }\r
-        this.setLayout(this.layout);\r
-\r
-        if(this.activeItem !== undefined){\r
-            var item = this.activeItem;\r
-            delete this.activeItem;\r
-            this.layout.setActiveItem(item);\r
-        }\r
-        if(!this.ownerCt){\r
-            // force a layout if no ownerCt is set\r
-            this.doLayout(false, true);\r
-        }\r
-        if(this.monitorResize === true){\r
-            Ext.EventManager.onWindowResize(this.doLayout, this, [false]);\r
-        }\r
-    },\r
-\r
-    <div id="method-Ext.Container-getLayoutTarget"></div>/**\r
-     * <p>Returns the Element to be used to contain the child Components of this Container.</p>\r
-     * <p>An implementation is provided which returns the Container's {@link #getEl Element}, but\r
-     * if there is a more complex structure to a Container, this may be overridden to return\r
-     * the element into which the {@link #layout layout} renders child Components.</p>\r
-     * @return {Ext.Element} The Element to render child Components into.\r
-     */\r
-    getLayoutTarget : function(){\r
-        return this.el;\r
-    },\r
-\r
-    // private - used as the key lookup function for the items collection\r
-    getComponentId : function(comp){\r
-        return comp.getItemId();\r
-    },\r
-\r
-    <div id="method-Ext.Container-add"></div>/**\r
-     * <p>Adds {@link Ext.Component Component}(s) to this Container.</p>\r
-     * <br><p><b>Description</b></u> :\r
-     * <div><ul class="mdetail-params">\r
-     * <li>Fires the {@link #beforeadd} event before adding</li>\r
-     * <li>The Container's {@link #defaults default config values} will be applied\r
-     * accordingly (see <code>{@link #defaults}</code> for details).</li>\r
-     * <li>Fires the {@link #add} event after the component has been added.</li>\r
-     * </ul></div>\r
-     * <br><p><b>Notes</b></u> :\r
-     * <div><ul class="mdetail-params">\r
-     * <li>If the Container is <i>already rendered</i> when <tt>add</tt>\r
-     * is called, you may need to call {@link #doLayout} to refresh the view which causes\r
-     * any unrendered child Components to be rendered. This is required so that you can\r
-     * <tt>add</tt> multiple child components if needed while only refreshing the layout\r
-     * once. For example:<pre><code>\r
-var tb = new {@link Ext.Toolbar}();\r
-tb.render(document.body);  // toolbar is rendered\r
-tb.add({text:'Button 1'}); // add multiple items ({@link #defaultType} for {@link Ext.Toolbar Toolbar} is 'button')\r
-tb.add({text:'Button 2'});\r
-tb.{@link #doLayout}();             // refresh the layout\r
-     * </code></pre></li>\r
-     * <li><i>Warning:</i> Containers directly managed by the BorderLayout layout manager\r
-     * may not be removed or added.  See the Notes for {@link Ext.layout.BorderLayout BorderLayout}\r
-     * for more details.</li>\r
-     * </ul></div>\r
-     * @param {Object/Array} component\r
-     * <p>Either a single component or an Array of components to add.  See\r
-     * <code>{@link #items}</code> for additional information.</p>\r
-     * @param {Object} (Optional) component_2\r
-     * @param {Object} (Optional) component_n\r
-     * @return {Ext.Component} component The Component (or config object) that was added.\r
-     */\r
-    add : function(comp){\r
-        this.initItems();\r
-        var args = arguments.length > 1;\r
-        if(args || Ext.isArray(comp)){\r
-            Ext.each(args ? arguments : comp, function(c){\r
-                this.add(c);\r
-            }, this);\r
-            return;\r
-        }\r
-        var c = this.lookupComponent(this.applyDefaults(comp));\r
-        var pos = this.items.length;\r
-        if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){\r
-            this.items.add(c);\r
-            c.ownerCt = this;\r
-            this.onAdd(c);\r
-            this.fireEvent('add', this, c, pos);\r
-        }\r
-        return c;\r
-    },\r
-\r
-    onAdd : function(c){\r
-        // Empty template method\r
-    },\r
-\r
-    <div id="method-Ext.Container-insert"></div>/**\r
-     * Inserts a Component into this Container at a specified index. Fires the\r
-     * {@link #beforeadd} event before inserting, then fires the {@link #add} event after the\r
-     * Component has been inserted.\r
-     * @param {Number} index The index at which the Component will be inserted\r
-     * into the Container's items collection\r
-     * @param {Ext.Component} component The child Component to insert.<br><br>\r
-     * Ext uses lazy rendering, and will only render the inserted Component should\r
-     * it become necessary.<br><br>\r
-     * A Component config object may be passed in order to avoid the overhead of\r
-     * constructing a real Component object if lazy rendering might mean that the\r
-     * inserted Component will not be rendered immediately. To take advantage of\r
-     * this 'lazy instantiation', set the {@link Ext.Component#xtype} config\r
-     * property to the registered type of the Component wanted.<br><br>\r
-     * For a list of all available xtypes, see {@link Ext.Component}.\r
-     * @return {Ext.Component} component The Component (or config object) that was\r
-     * inserted with the Container's default config values applied.\r
-     */\r
-    insert : function(index, comp){\r
-        this.initItems();\r
-        var a = arguments, len = a.length;\r
-        if(len > 2){\r
-            for(var i = len-1; i >= 1; --i) {\r
-                this.insert(index, a[i]);\r
-            }\r
-            return;\r
-        }\r
-        var c = this.lookupComponent(this.applyDefaults(comp));\r
-        index = Math.min(index, this.items.length);\r
-        if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){\r
-            if(c.ownerCt == this){\r
-                this.items.remove(c);\r
-            }\r
-            this.items.insert(index, c);\r
-            c.ownerCt = this;\r
-            this.onAdd(c);\r
-            this.fireEvent('add', this, c, index);\r
-        }\r
-        return c;\r
-    },\r
-\r
-    // private\r
-    applyDefaults : function(c){\r
-        if(this.defaults){\r
-            if(Ext.isString(c)){\r
-                c = Ext.ComponentMgr.get(c);\r
-                Ext.apply(c, this.defaults);\r
-            }else if(!c.events){\r
-                Ext.applyIf(c, this.defaults);\r
-            }else{\r
-                Ext.apply(c, this.defaults);\r
-            }\r
-        }\r
-        return c;\r
-    },\r
-\r
-    // private\r
-    onBeforeAdd : function(item){\r
-        if(item.ownerCt){\r
-            item.ownerCt.remove(item, false);\r
-        }\r
-        if(this.hideBorders === true){\r
-            item.border = (item.border === true);\r
-        }\r
-    },\r
-\r
-    <div id="method-Ext.Container-remove"></div>/**\r
-     * Removes a component from this container.  Fires the {@link #beforeremove} event before removing, then fires\r
-     * the {@link #remove} event after the component has been removed.\r
-     * @param {Component/String} component The component reference or id to remove.\r
-     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.\r
-     * Defaults to the value of this Container's {@link #autoDestroy} config.\r
-     * @return {Ext.Component} component The Component that was removed.\r
-     */\r
-    remove : function(comp, autoDestroy){\r
-        this.initItems();\r
-        var c = this.getComponent(comp);\r
-        if(c && this.fireEvent('beforeremove', this, c) !== false){\r
-            delete c.ownerCt;\r
-            if(this.layout && this.rendered){\r
-                this.layout.onRemove(c);\r
-            }\r
-            this.onRemove(c);\r
-            this.items.remove(c);\r
-            if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){\r
-                c.destroy();\r
-            }\r
-            this.fireEvent('remove', this, c);\r
-        }\r
-        return c;\r
-    },\r
-\r
-    onRemove: function(c){\r
-        // Empty template method\r
-    },\r
-\r
-    <div id="method-Ext.Container-removeAll"></div>/**\r
-     * Removes all components from this container.\r
-     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.\r
-     * Defaults to the value of this Container's {@link #autoDestroy} config.\r
-     * @return {Array} Array of the destroyed components\r
-     */\r
-    removeAll: function(autoDestroy){\r
-        this.initItems();\r
-        var item, rem = [], items = [];\r
-        this.items.each(function(i){\r
-            rem.push(i);\r
-        });\r
-        for (var i = 0, len = rem.length; i < len; ++i){\r
-            item = rem[i];\r
-            this.remove(item, autoDestroy);\r
-            if(item.ownerCt !== this){\r
-                items.push(item);\r
-            }\r
-        }\r
-        return items;\r
-    },\r
-\r
-    <div id="method-Ext.Container-getComponent"></div>/**\r
-     * Examines this container's <code>{@link #items}</code> <b>property</b>\r
-     * and gets a direct child component of this container.\r
-     * @param {String/Number} comp This parameter may be any of the following:\r
-     * <div><ul class="mdetail-params">\r
-     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>\r
-     * or <code>{@link Ext.Component#id id}</code> of the child component </li>\r
-     * <li>a <b><tt>Number</tt></b> : representing the position of the child component\r
-     * within the <code>{@link #items}</code> <b>property</b></li>\r
-     * </ul></div>\r
-     * <p>For additional information see {@link Ext.util.MixedCollection#get}.\r
-     * @return Ext.Component The component (if found).\r
-     */\r
-    getComponent : function(comp){\r
-        if(Ext.isObject(comp)){\r
-            comp = comp.getItemId();\r
-        }\r
-        return this.items.get(comp);\r
-    },\r
-\r
-    // private\r
-    lookupComponent : function(comp){\r
-        if(Ext.isString(comp)){\r
-            return Ext.ComponentMgr.get(comp);\r
-        }else if(!comp.events){\r
-            return this.createComponent(comp);\r
-        }\r
-        return comp;\r
-    },\r
-\r
-    // private\r
-    createComponent : function(config){\r
-        return Ext.create(config, this.defaultType);\r
-    },\r
-\r
-    // private\r
-    canLayout: function() {\r
-        var el = this.getVisibilityEl();\r
-        return el && !el.isStyle("display", "none");\r
-    },\r
-\r
-\r
-    <div id="method-Ext.Container-doLayout"></div>/**\r
-     * Force this container's layout to be recalculated. A call to this function is required after adding a new component\r
-     * to an already rendered container, or possibly after changing sizing/position properties of child components.\r
-     * @param {Boolean} shallow (optional) True to only calc the layout of this component, and let child components auto\r
-     * calc layouts as required (defaults to false, which calls doLayout recursively for each subcontainer)\r
-     * @param {Boolean} force (optional) True to force a layout to occur, even if the item is hidden.\r
-     * @return {Ext.Container} this\r
-     */\r
-    doLayout: function(shallow, force){\r
-        var rendered = this.rendered;\r
-        forceLayout = force || this.forceLayout;\r
-\r
-        if(!this.canLayout() || this.collapsed){\r
-            this.deferLayout = this.deferLayout || !shallow;\r
-            if(!forceLayout){\r
-                return;\r
-            }\r
-            shallow = shallow && !this.deferLayout;\r
-        } else {\r
-            delete this.deferLayout;\r
-        }\r
-        if(rendered && this.layout){\r
-            this.layout.layout();\r
-        }\r
-        if(shallow !== true && this.items){\r
-            var cs = this.items.items;\r
-            for(var i = 0, len = cs.length; i < len; i++){\r
-                var c = cs[i];\r
-                if(c.doLayout){\r
-                    c.doLayout(false, forceLayout);\r
-                }\r
-            }\r
-        }\r
-        if(rendered){\r
-            this.onLayout(shallow, forceLayout);\r
-        }\r
-        // Initial layout completed\r
-        this.hasLayout = true;\r
-        delete this.forceLayout;\r
-    },\r
-\r
-    //private\r
-    onLayout : Ext.emptyFn,\r
-\r
-    // private\r
-    shouldBufferLayout: function(){\r
-        /*\r
-         * Returns true if the container should buffer a layout.\r
-         * This is true only if the container has previously been laid out\r
-         * and has a parent container that is pending a layout.\r
-         */\r
-        var hl = this.hasLayout;\r
-        if(this.ownerCt){\r
-            // Only ever buffer if we've laid out the first time and we have one pending.\r
-            return hl ? !this.hasLayoutPending() : false;\r
-        }\r
-        // Never buffer initial layout\r
-        return hl;\r
-    },\r
-\r
-    // private\r
-    hasLayoutPending: function(){\r
-        // Traverse hierarchy to see if any parent container has a pending layout.\r
-        var pending = false;\r
-        this.ownerCt.bubble(function(c){\r
-            if(c.layoutPending){\r
-                pending = true;\r
-                return false;\r
-            }\r
-        });\r
-        return pending;\r
-    },\r
-\r
-    onShow : function(){\r
-        Ext.Container.superclass.onShow.call(this);\r
-        if(this.deferLayout !== undefined){\r
-            this.doLayout(true);\r
-        }\r
-    },\r
-\r
-    <div id="method-Ext.Container-getLayout"></div>/**\r
-     * Returns the layout currently in use by the container.  If the container does not currently have a layout\r
-     * set, a default {@link Ext.layout.ContainerLayout} will be created and set as the container's layout.\r
-     * @return {ContainerLayout} layout The container's layout\r
-     */\r
-    getLayout : function(){\r
-        if(!this.layout){\r
-            var layout = new Ext.layout.ContainerLayout(this.layoutConfig);\r
-            this.setLayout(layout);\r
-        }\r
-        return this.layout;\r
-    },\r
-\r
-    // private\r
-    beforeDestroy : function(){\r
-        if(this.items){\r
-            Ext.destroy.apply(Ext, this.items.items);\r
-        }\r
-        if(this.monitorResize){\r
-            Ext.EventManager.removeResizeListener(this.doLayout, this);\r
-        }\r
-        Ext.destroy(this.layout);\r
-        Ext.Container.superclass.beforeDestroy.call(this);\r
-    },\r
-\r
-    <div id="method-Ext.Container-bubble"></div>/**\r
-     * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (<i>this</i>) of\r
-     * function call will be the scope provided or the current component. The arguments to the function\r
-     * will be the args provided or the current component. If the function returns false at any point,\r
-     * the bubble is stopped.\r
-     * @param {Function} fn The function to call\r
-     * @param {Object} scope (optional) The scope of the function (defaults to current node)\r
-     * @param {Array} args (optional) The args to call the function with (default to passing the current component)\r
-     * @return {Ext.Container} this\r
-     */\r
-    bubble : function(fn, scope, args){\r
-        var p = this;\r
-        while(p){\r
-            if(fn.apply(scope || p, args || [p]) === false){\r
-                break;\r
-            }\r
-            p = p.ownerCt;\r
-        }\r
-        return this;\r
-    },\r
-\r
-    <div id="method-Ext.Container-cascade"></div>/**\r
-     * Cascades down the component/container heirarchy from this component (called first), calling the specified function with\r
-     * each component. The scope (<i>this</i>) of\r
-     * function call will be the scope provided or the current component. The arguments to the function\r
-     * will be the args provided or the current component. If the function returns false at any point,\r
-     * the cascade is stopped on that branch.\r
-     * @param {Function} fn The function to call\r
-     * @param {Object} scope (optional) The scope of the function (defaults to current component)\r
-     * @param {Array} args (optional) The args to call the function with (defaults to passing the current component)\r
-     * @return {Ext.Container} this\r
-     */\r
-    cascade : function(fn, scope, args){\r
-        if(fn.apply(scope || this, args || [this]) !== false){\r
-            if(this.items){\r
-                var cs = this.items.items;\r
-                for(var i = 0, len = cs.length; i < len; i++){\r
-                    if(cs[i].cascade){\r
-                        cs[i].cascade(fn, scope, args);\r
-                    }else{\r
-                        fn.apply(scope || cs[i], args || [cs[i]]);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-        return this;\r
-    },\r
-\r
-    <div id="method-Ext.Container-findById"></div>/**\r
-     * Find a component under this container at any level by id\r
-     * @param {String} id\r
-     * @return Ext.Component\r
-     */\r
-    findById : function(id){\r
-        var m, ct = this;\r
-        this.cascade(function(c){\r
-            if(ct != c && c.id === id){\r
-                m = c;\r
-                return false;\r
-            }\r
-        });\r
-        return m || null;\r
-    },\r
-\r
-    <div id="method-Ext.Container-findByType"></div>/**\r
-     * Find a component under this container at any level by xtype or class\r
-     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly\r
-     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is\r
-     * the default), or true to check whether this Component is directly of the specified xtype.\r
-     * @return {Array} Array of Ext.Components\r
-     */\r
-    findByType : function(xtype, shallow){\r
-        return this.findBy(function(c){\r
-            return c.isXType(xtype, shallow);\r
-        });\r
-    },\r
-\r
-    <div id="method-Ext.Container-find"></div>/**\r
-     * Find a component under this container at any level by property\r
-     * @param {String} prop\r
-     * @param {String} value\r
-     * @return {Array} Array of Ext.Components\r
-     */\r
-    find : function(prop, value){\r
-        return this.findBy(function(c){\r
-            return c[prop] === value;\r
-        });\r
-    },\r
-\r
-    <div id="method-Ext.Container-findBy"></div>/**\r
-     * Find a component under this container at any level by a custom function. If the passed function returns\r
-     * true, the component will be included in the results. The passed function is called with the arguments (component, this container).\r
-     * @param {Function} fn The function to call\r
-     * @param {Object} scope (optional)\r
-     * @return {Array} Array of Ext.Components\r
-     */\r
-    findBy : function(fn, scope){\r
-        var m = [], ct = this;\r
-        this.cascade(function(c){\r
-            if(ct != c && fn.call(scope || c, c, ct) === true){\r
-                m.push(c);\r
-            }\r
-        });\r
-        return m;\r
-    },\r
-\r
-    <div id="method-Ext.Container-get"></div>/**\r
-     * Get a component contained by this container (alias for items.get(key))\r
-     * @param {String/Number} key The index or id of the component\r
-     * @return {Ext.Component} Ext.Component\r
-     */\r
-    get : function(key){\r
-        return this.items.get(key);\r
-    }\r
-});\r
-\r
-Ext.Container.LAYOUTS = {};\r
-Ext.reg('container', Ext.Container);\r
+Ext.define('Ext.container.Container', {
+    extend: 'Ext.container.AbstractContainer',
+    alias: 'widget.container',
+    alternateClassName: 'Ext.Container',
+
+<span id='Ext-container-Container-method-getChildByElement'>    /**
+</span>     * Return the immediate child Component in which the passed element is located.
+     * @param {Ext.Element/HTMLElement/String} el The element to test (or ID of element).
+     * @return {Ext.Component} The child item which contains the passed element.
+     */
+    getChildByElement: function(el) {
+        var item,
+            itemEl,
+            i = 0,
+            it = this.items.items,
+            ln = it.length;
+
+        el = Ext.getDom(el);
+        for (; i &lt; ln; i++) {
+            item = it[i];
+            itemEl = item.getEl();
+            if ((itemEl.dom === el) || itemEl.contains(el)) {
+                return item;
+            }
+        }
+        return null;
+    }
+});
 </pre>
 </body>
-</html>
\ No newline at end of file
+</html>