I have a store in which I have mentioned the pageSize config to be 20 and also in my reader I have mentioned the totalCount config. I make the proxy request to a servlet in Java. The servlet fetches data from a MySQL table and builds a json containing 500 rows, and I set the totalCount config in the json to 500. I call store.loadPage(1) at the end. Despite of all this, my grid is loading all the 500 records on every page in the grid. What am I doing wrong?
Below I have given a few snapshots of my code
var store = Ext.create('Ext.data.Store', {
model: 'AM.model.User',
pageSize: 20,
proxy: {
type: 'ajax',
url: '/pwbench/FcmServlet',
reader: {
type: 'json',
totalProperty: 'total',
root: 'start'
},
writer: {
type: 'json'
}
},
});
The json returned from the servlet is like this ["total":"500","start":[{....}]]
I checked the grid paging example on http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/grid/paging.html and I can't understand why my paging is not working. Please help.