Skip to main content

Posts

Showing posts from February, 2013

Ext JS 4 - Ajax Proxy

Ajax proxy in Ext JS is most widely used one for reading and writing information from/to web server. The configuration of ajax proxy is applied either in store or model class and it is based on the following criteria.   1. We need to define our proxy configuration in model class whenever we need to reuse the same model in various stores with same proxy configuration.   2. We need to define our proxy configuration in store class whenever we need to reuse the same model class in various stores with various proxy configuration. Let's see an example for Ajax proxy. Here I am getting JSON data from web server and displaying those data by using grid component. User.js - Model Ext.define('MyApp.model.User',{ extend : 'Ext.data.Model', fields : [{ name : 'id', type : 'int' }, { name : 'userName', type : 'String' }, { name : 'email', type : 'String' }] }); User.js - Store Ext.define(&#