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

The field container

There are times when we need to group textfields or any other components other than checkbox and radio buttons. We can use the field container to group any type of field.

One of the advantages of using a field container is the ability to use a layout; we can use any of the available layouts in the framework. We have learned about the layouts in the previous chapters.

The following code shows how we can group a textfield and a combobox to show these fields in the same line. We need to edit our previous code to add a few configurations to the price and size fields:

Ext.define('MyApp.view.AvailableFields',{
extend      : 'Ext.form.Panel',

  //...

  buildItems : function(){

    //...

     //Step 1
    var num = Ext.create('Ext.form.field.Number',{
 emptyText ...

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