PDA

View Full Version : How to use loadexception?



jangy
17 Jul 2009, 4:32 AM
hi!
this is my datastore code:



DataStore = new Ext.data.Store({
id: 'DataStore',
proxy: new Ext.data.HttpProxy({
url: '../loadGrid.do',
method: 'POST'
}),
reader: new Ext.data.XmlReader({
record: 'tipocarta'
},
RecordDef),
listeners: {
loadexception: function (proxy, options, response, e) {
var result = response.responseText;
Ext.MessageBox.alert('Errore nel caricamento Dati', result);
}
}
});


loadexception work in FF 3.5 but no work in IE6-7-8 why? what's i wrong?

tryanDLS
17 Jul 2009, 6:40 AM
http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly

http://extjs.com/learn/Ext_FAQ_Grid

Are you setting the correct content type?
Also, loadexception is deprecated in favor of exception in 3.0.

jangy
22 Jul 2009, 4:32 AM
ok...but how i use exception when i load my store for grid?
for example the xmlreader read xml, i want that, if in the server side the code generate error message, extjs cacth the exception (text in response) and stamp excpetion error in a alert.
With load exception works in firefox 3.5 but no works in ie6,7,8 why???
Sorry for my english...