Now we know that each type of field is defined by its xtype
. But where do xtypes
come from, and how many of them are there? An xtype
is just a reference to a particular Ext component, so a 'textfield' xtype
is the same as its Ext.form.TextField
counterpart. Here are examples of some of the xtypes
that are available to us:
textfield
timefield
numberfield
datefield
combo
textarea
Because these are all just Ext components, we could easily be using a grid, toolbar, or button—pretty much anything! A recurring theme in Ext components is that everything is interchangeable, and everything shares the same core functions. This ensures that just about any scenario can be handled with the Ext library.
Our basic field config is set up like this:
{ xtype: 'textfield', fieldLabel: 'Title', name: 'title' }
Of course, we have the xtype
that defines what type of a field it is—in our case it is a textfield
. The fieldLabel
is the text label that is...