O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A basic dataview

Now, we are going to define the view of our application. We are going to place our dataview file in the views folder. The purpose of this view is to have a component in our application to activate or cancel users.

/**
 * @classApp.view.UsersView
 * @extendsExt.view.View
 * This the definition of our users data view
 */
Ext.define('App.view.UsersView', {
  extend: 'Ext.view.View', //step one
  xtype:'usersview', //step two
  store:'Users', //step three
  emptyText:'No users available', //step four
  tpl:[ //step five
    '<tplfor=".">',
      '<div>{firstName} {lastName}</div>',
    '</tpl>'].join('')
});

In the previous code, we have defined our user's dataview.

  • In step one, we have extended our class from Ext.view.view. That's our base class for all views ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required