bhomass
30 Jan 2008, 6:41 PM
I need a callback function for my combo store, such that when success is false, it pops up a message.
var OpEnumComboStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: 'http://localhost:8080/crm/loadList?fieldId=4724'}),
reader: new Ext.data.JsonReader({
root: 'List',
fields: ['name', 'value']
})
});
function OpEnumCombocallback(response, options, success){
if (!success) {
Ext.MessageBox.alert('Sorry, please try again. [Q304]',response.responseText);
}
};
OpEnumComboStore.load({callback:OpEnumCombocallback});
the return JSON string is
{ 'success':'false',
'message':'Entity Class Opportunity for table RecordsViewTopRow is not set in session',
}
the callback does catch success==false, but I don't see the reponse message in either response or options.
where is my mistake?
var OpEnumComboStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: 'http://localhost:8080/crm/loadList?fieldId=4724'}),
reader: new Ext.data.JsonReader({
root: 'List',
fields: ['name', 'value']
})
});
function OpEnumCombocallback(response, options, success){
if (!success) {
Ext.MessageBox.alert('Sorry, please try again. [Q304]',response.responseText);
}
};
OpEnumComboStore.load({callback:OpEnumCombocallback});
the return JSON string is
{ 'success':'false',
'message':'Entity Class Opportunity for table RecordsViewTopRow is not set in session',
}
the callback does catch success==false, but I don't see the reponse message in either response or options.
where is my mistake?