Submitting the data

So far, we have seen how to create and configure the components to collect data using the available widgets, but we need to do something with it. Ext JS provides different ways to submit the captured data to our server.

The Ext.form.Panel class contains an instance of the Ext.form.Basic class. This class is used to manage the data within the form, such as validations, settings, retrieving data from the fields, submitting and loading data from the server, and so on.

Let's make some slight changes to our first form:

Ext.define('Myapp.view.CustomerForm02', {
  ...
  initComponent: function() {
    var me = this;
    me.dockedItems= [{
      xtype: 'toolbar',
      dock: 'bottom',
      items: [
        {
          xtype: 'tbfill'
        },{
          xtype: 'button',
          iconCls: 'save-16',
 text: ...

Get Learning Ext JS - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.