2 * @example Lazy Instantiation
4 * A basic example demonstrating how a Container contains other items using the items config.
6 Ext.require('Ext.tab.Panel');
7 Ext.require('Ext.window.MessageBox');
9 Ext.onReady(function() {
11 Ext.create('Ext.tab.Panel', {
12 renderTo: Ext.getBody(),
17 // Explicitly define the xtype of this Component configuration.
18 // This tells the Container (the tab panel in this case)
19 // to instantiate a Ext.panel.Panel when it deems necessary
22 html: 'The first tab',
25 Ext.MessageBox.alert('Rendered One', 'Tab One was rendered.');
30 // this component configuration does not have an xtype since 'panel' is the default
31 // xtype for all Component configurations in a Container
33 html: 'The second tab',
36 Ext.MessageBox.alert('Rendered One', 'Tab Two was rendered.');