-</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#ctCls" ext:member="#ctCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Container-defaultType"></a><b><a href="source/Container.html#cfg-Ext.Container-defaultType">defaultType</a></b> : String<div class="mdesc"><div class="short">The default xtype of child Components to create in this Container when \r
-a child item is specified as a raw configurat...</div><div class="long"><p>The default <a href="output/Ext.Component.html" ext:cls="Ext.Component">xtype</a> 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 <a href="output/Ext.menu.Menu.html" ext:cls="Ext.menu.Menu">Ext.menu.Menu</a> which defaults to <tt>'menuitem'</tt>,\r
-and <a href="output/Ext.Toolbar.html" ext:cls="Ext.Toolbar">Ext.Toolbar</a> and <a href="output/Ext.ButtonGroup.html" ext:cls="Ext.ButtonGroup">Ext.ButtonGroup</a> which default to <tt>'button'</tt>.</p></div></div></td><td class="msource"><a href="output/Ext.Container.html#defaultType" ext:member="#defaultType" ext:cls="Ext.Container">Container</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Container-defaults"></a><b><a href="source/Container.html#cfg-Ext.Container-defaults">defaults</a></b> : Object<div class="mdesc"><div class="short">A config object that will be applied to all components added to this container either via the items \r
-config or via th...</div><div class="long"><p>A config object that will be applied to all components added to this container either via the <a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">items</a>\r
-config or via the <a href="output/Ext.Container.html#Ext.Container-add" ext:member="add" ext:cls="Ext.Container">add</a> or <a href="output/Ext.Container.html#Ext.Container-insert" ext:member="insert" ext:cls="Ext.Container">insert</a> 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 <a href="output/Ext.Panel.html" ext:cls="Ext.Panel">Ext.Panel</a> 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>defaults: { <i>// defaults are applied to items, not the container\r</i>
- autoScroll:true\r
-},\r
-items: [\r
- {\r
- xtype: <em>'panel'</em>, <i>// defaults <b><b>do</b> not</b> have precedence over\r</i>
- id: <em>'panel1'</em>, <i>// options <b>in</b> config objects, so the defaults\r</i>
- autoScroll: false <i>// will not be applied here, panel1 will be autoScroll:false\r</i>
- },\r
- <b>new</b> Ext.Panel({ <i>// defaults <b><b>do</b></b> have precedence over options\r</i>
- id: <em>'panel2'</em>, <i>// options <b>in</b> components, so the defaults\r</i>
- autoScroll: false <i>// will be applied here, panel2 will be autoScroll:true.\r</i>
- })\r
+</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#ctCls" ext:member="#ctCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-data"></a><b><a href="source/Component.html#cfg-Ext.Component-data">data</a></b> : Mixed<div class="mdesc">The initial set of data to apply to the <code><a href="output/Ext.Component.html#Ext.Component-tpl" ext:member="tpl" ext:cls="Ext.Component">tpl</a></code> to
+update the content area of the Component.</div></td><td class="msource"><a href="output/Ext.Component.html#data" ext:member="#data" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Container-defaultType"></a><b><a href="source/Container.html#cfg-Ext.Container-defaultType">defaultType</a></b> : String<div class="mdesc"><div class="short">The default xtype of child Components to create in this Container when\r
+a child item is specified as a raw configurati...</div><div class="long"><p>The default <a href="output/Ext.Component.html" ext:cls="Ext.Component">xtype</a> of child Components to create in this Container when
+a child item is specified as a raw configuration object, rather than as an instantiated Component.</p>
+<p>Defaults to <code><em>'panel'</em></code>, except <a href="output/Ext.menu.Menu.html" ext:cls="Ext.menu.Menu">Ext.menu.Menu</a> which defaults to <code><em>'menuitem'</em></code>,
+and <a href="output/Ext.Toolbar.html" ext:cls="Ext.Toolbar">Ext.Toolbar</a> and <a href="output/Ext.ButtonGroup.html" ext:cls="Ext.ButtonGroup">Ext.ButtonGroup</a> which default to <code><em>'button'</em></code>.</p></div></div></td><td class="msource"><a href="output/Ext.Container.html#defaultType" ext:member="#defaultType" ext:cls="Ext.Container">Container</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Container-defaults"></a><b><a href="source/Container.html#cfg-Ext.Container-defaults">defaults</a></b> : Object|Function<div class="mdesc"><div class="short">This option is a means of applying default settings to all added items whether added through the items\r
+config or via ...</div><div class="long"><p>This option is a means of applying default settings to all added items whether added through the <a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">items</a>
+config or via the <a href="output/Ext.Container.html#Ext.Container-add" ext:member="add" ext:cls="Ext.Container">add</a> or <a href="output/Ext.Container.html#Ext.Container-insert" ext:member="insert" ext:cls="Ext.Container">insert</a> methods.</p>
+<p>If an added item is a config object, and <b>not</b> an instantiated Component, then the default properties are
+unconditionally applied. If the added item <b>is</b> an instantiated Component, then the default properties are
+applied conditionally so as not to override existing properties in the item.</p>
+<p>If the defaults option is specified as a function, then the function will be called using this Container as the
+scope (<code>this</code> reference) and passing the added item as the first parameter. Any resulting object
+from that call is then applied to the item as default properties.</p>
+<p>For example, to automatically apply padding to the body of each of a set of
+contained <a href="output/Ext.Panel.html" ext:cls="Ext.Panel">Ext.Panel</a> items, you could pass: <code>defaults: {bodyStyle:<em>'padding:15px'</em>}</code>.</p>
+<p>Usage:</p><pre><code>defaults: { <i>// defaults are applied to items, not the container</i>
+ autoScroll:true
+},
+items: [
+ {
+ xtype: <em>'panel'</em>, <i>// defaults <b><b>do</b> not</b> have precedence over</i>
+ id: <em>'panel1'</em>, <i>// options <b>in</b> config objects, so the defaults</i>
+ autoScroll: false <i>// will not be applied here, panel1 will be autoScroll:false</i>
+ },
+ <b>new</b> Ext.Panel({ <i>// defaults <b><b>do</b></b> have precedence over options</i>
+ id: <em>'panel2'</em>, <i>// options <b>in</b> components, so the defaults</i>
+ autoScroll: false <i>// will be applied here, panel2 will be autoScroll:true.</i>
+ })