fedelman
4 Aug 2007, 9:10 PM
Guys, I've got a data.Store like that:
var myds = new Ext.data.Store
(
{
proxy: new Ext.data.HttpProxy
(
{
url: 'http://foo.bar/list'
}
),
reader: new Ext.data.JsonReader
(
{
root: 'posts',
totalProperty: 'count',
id: 'id'
},
[
{name: 'title', mapping: 'title'},
{name: 'timestamp', mapping: 'timestamp'},
{name: 'post', mapping: 'post'}
]
),
remoteSort: true
}
);
myds.setDefaultSort('timestamp', 'desc');};
What happen if the target URL (http://foo.bar/list) not exists, timeout, return an invalid data or another fail option?
How can I catch this error and display in a Ext.MessageBox.alert()?
I use this ds in a grid.
Thanks,
Fede
var myds = new Ext.data.Store
(
{
proxy: new Ext.data.HttpProxy
(
{
url: 'http://foo.bar/list'
}
),
reader: new Ext.data.JsonReader
(
{
root: 'posts',
totalProperty: 'count',
id: 'id'
},
[
{name: 'title', mapping: 'title'},
{name: 'timestamp', mapping: 'timestamp'},
{name: 'post', mapping: 'post'}
]
),
remoteSort: true
}
);
myds.setDefaultSort('timestamp', 'desc');};
What happen if the target URL (http://foo.bar/list) not exists, timeout, return an invalid data or another fail option?
How can I catch this error and display in a Ext.MessageBox.alert()?
I use this ds in a grid.
Thanks,
Fede