The simplest form, yet very temporary, is to save and load data in an in-memory variable. In the Working with Store recipe, we used the inline data to load records in the store. However, that does not utilize the reader. In order to use the capabilities of the reader, we have to use proxy
. MemoryProxy is an implementation of the proxy
class to help us work with the in-memory data and use the reader's capabilities. This recipe shows how to use the memory proxy.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps:
Create and open a new file named
ch05_11.js
and paste the following code into it:Ext.setup({ onReady: function() { Ext.regModel('User', { fields: [ {name: 'name', type: 'string'}, {name: 'age', type: 'int'}, {name: 'phone', type: 'string'}, {name: 'email', type: 'string'}...