Wednesday, July 1, 2015

ExtJS - Lazy Instantiation(xtype)

  • Every component has the alias name in ExtJS.
  • Alias name are used to create the instance of the component.
  • Alias name to be provided in the component property xtype.
  • By creating components using xtype will help us to create the instance of the component when required.
  • In large applications, This is the ideal way to create the components.

         Ext.create('Ext.tab.Panel', {
        renderTo: Ext.getBody(),
        height: 100,
        width: 200,
        items: [
            {
                xtype: 'panel',
                title: 'xtype Panel',
                html: 'Panel created using xtype',
                listeners: {
                    render: function() {
                     
                    }
                }
            }
        ]
    });


No comments: