Book Image

Learning Ext JS 4

By : Crysfel Villa, Armando Gonzalez
Book Image

Learning Ext JS 4

By: Crysfel Villa, Armando Gonzalez

Overview of this book

<p>Ext JS is a JavaScript library for building interactive web applications using techniques such as Ajax, DHTML, and DOM scripting.<br /><br />Ext JS 4 features expanded functionality, plugin-free charting, and a new MVC architecture, it's the best Ext JS web application development platform yet. It helps develop incredible web apps for every browser.<br /><br />Learning Ext JS 4 will teach you how to get the best of each Ext JS component and also show you some very practical examples that you can use in real world applications. You will also learn why it is so useful and powerful in developing fast and beautiful applications.<br /><br />The book starts with the very basics of Ext JS. You will learn to create a small application step-by-step, and add new features to it in every chapter.<br /><br />Once you grasp the basics, you will learn more complicated topics such as creating new components, templates, architecture, patterns, and also tips and techniques that will help you improve your skills on JavaScript and Ext JS 4. We also cover how to create themes to make your application design beautiful and customize it the way you need.<br /><br />At the end of the book, you will have a working application built using all the knowledge you gained from the book.</p> <p>&nbsp;</p>
Table of Contents (20 chapters)
Learning Ext JS 4
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

A basic grid panel


Once we have our model and store, we are ready to define the grid that will show our clients information as shown in the following code:

/**
 * @classMyApp.view.BasicGridPanel
 * @extendsExt.grid.Panel
 * @author Armando Gonzalez <[email protected]>
 * This the basic grid panel definition.
 */
Ext.define('MyApp.view.BasicGridPanel', {
  extend: 'Ext.grid.Panel',

  width:700,
  height:180,
  title:'Clients',

  initComponent: function() {
    var me = this;
    me.createModel();
    me.columns = me.buildColumns();
    me.store =  me.buildStore();

    this.callParent(arguments);
  },
  createModel:function(){ //The definition of the client model

  },
  buildStore:function(){  //defining the client`s store

  },
  buildColumns : function(){
    return [
            {
            text:'Name',
            width:100,
            dataIndex:'name'
            },{
            text:'Last Name',
            width:100,
            dataIndex:'lastname'
            },{
       ...