Here is the provided code snippet:
Ext.define('Book', {
extend: 'Ext.data.Model',
fields: [
{name: 'id', type: 'int'},
{name: 'title', type: 'string'},
{name: 'pages', type: 'int'},
{name: 'numChapters', type: 'int'}
]
});
var ajaxProxy = Ext.create('Ext.data.proxy.Ajax', {
url: 'books.json',
model: 'Book'
});
var operation = Ext.create('Ext.data.Operation', {
action: 'read',
start: 0,
limit: 5
});
operation.read();
The file books.json contains 6 rows. When running the code above, all 6 rows are being fetched instead of the expected 5.
ajaxProxy.read(operation, function ()
{
console.log(operation.response.responseText);
});