martinrame
15 Oct 2012, 2:42 PM
Hi, I'm using an Ext.grid.Panel with a verticalScrollerType: 'pagingridscroller" (aka Paging Grid) loaded from this JsonStore:
Ext.define('MyApp.store.Movimientos', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.Movimiento'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
pageSize: 100,
remoteSort: true,
remoteFilter: true,
buffered: true,
model: 'MyApp.model.Movimiento',
proxy: {
type: 'ajax',
api: {
read: '/cgi-bin/tarjeta.cgi/movimientos/read'
},
reader: {
type: 'json',
idProperty: 'IDMOVIMIENTO',
totalProperty: 'total',
successProperty: 'success',
root: 'root'
},
simpleSortMode: true
}, cfg)]);
}
});
When the query I made on the server side have results, the grid is working ok, I mean, it initially shows the loadMask, then the data. But, when the query returns empty results, the loadMask stays forever.
Here's an example of empty result:
{
"root" : [],
"success" : false,
"total" : 0
}
What I'm doing wrong?. I would like the loadMask to dissapear, then see the empty grid.
BTW: Using Extjs 4.1
Ext.define('MyApp.store.Movimientos', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.Movimiento'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
pageSize: 100,
remoteSort: true,
remoteFilter: true,
buffered: true,
model: 'MyApp.model.Movimiento',
proxy: {
type: 'ajax',
api: {
read: '/cgi-bin/tarjeta.cgi/movimientos/read'
},
reader: {
type: 'json',
idProperty: 'IDMOVIMIENTO',
totalProperty: 'total',
successProperty: 'success',
root: 'root'
},
simpleSortMode: true
}, cfg)]);
}
});
When the query I made on the server side have results, the grid is working ok, I mean, it initially shows the loadMask, then the data. But, when the query returns empty results, the loadMask stays forever.
Here's an example of empty result:
{
"root" : [],
"success" : false,
"total" : 0
}
What I'm doing wrong?. I would like the loadMask to dissapear, then see the empty grid.
BTW: Using Extjs 4.1