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

Submitting the data

So far we have learned 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 and retrieving data to the fields, submitting and loading data from the server, and so on.

In order to send the data to the server we can use the submit method from the basic form. Let's add a button to our form and then submit the entered data to our server:

Ext.define('MyApp.view.AvailableFields',{ extend : 'Ext.form.Panel', //... initComponent : function(){ ...

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