Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Comments about using layouts


Consider that you can nest layouts using combinations of containers and layouts, and also remember to ensure the right configuration each layout needs. In upcoming chapters, we will use layout nesting and containers-layout combinations so that you can have a more precise idea of how to combine these. Meanwhile, you can try to nest, combine, and play with the layout system.

One of the common mistakes that Ext JS beginners make is with the overnesting components; this can sometimes harm performance. You need to use layouts and set the proper type of container with adequate planning, for example:

Ext.onReady(function(){
  Ext.create('Ext.panel.Panel', {
    width: 500,  height: 300,
    title:  'Border Layout',
    layout: 'border',
    items: [
      {// Incorrect Nesting
        xtype: 'panel',
        title: 'West Region',
        region:'west',
        width: 200,
        collapsible: true,
        layout: 'fit'
        items:[{
          xtype: 'form',
     ...