gkassyou
30 Aug 2007, 8:05 AM
I'm having a problem reading the data returned from my server. Although I can view my JSON response in firebug which seems to be ok but the datastore is not reading for some reason. Perhaps because my serverside is slower in returning the data, that the DS does not wait. Any ideas.
var orderDS = new Ext.data.Store({
proxy: new Ext.data.ScriptTagProxy({
url: 'http://127.0.0.1:8080/IAP_Fulfiller/Order.jsp?fulfillerID='+fulfillerID
}),
reader: new Ext.data.JsonReader({
root: 'orderInfo',
totalProperty: 'totalCount',
id: 'orderID'
}, [
{name: 'orderID', mapping: 'orderID', type: 'int'},
{name: 'freight', mapping: 'estimatedFreight', type: 'float'}
]),
// turn off remote sorting
remoteSort: false
});
orderDS.load();
stcCallback1001 (
({
"orderInfo":[
{
"orderID":"04022015",
"estimatedFreight":"0.00"
}],"totalCount":"1"})
);
var orderDS = new Ext.data.Store({
proxy: new Ext.data.ScriptTagProxy({
url: 'http://127.0.0.1:8080/IAP_Fulfiller/Order.jsp?fulfillerID='+fulfillerID
}),
reader: new Ext.data.JsonReader({
root: 'orderInfo',
totalProperty: 'totalCount',
id: 'orderID'
}, [
{name: 'orderID', mapping: 'orderID', type: 'int'},
{name: 'freight', mapping: 'estimatedFreight', type: 'float'}
]),
// turn off remote sorting
remoteSort: false
});
orderDS.load();
stcCallback1001 (
({
"orderInfo":[
{
"orderID":"04022015",
"estimatedFreight":"0.00"
}],"totalCount":"1"})
);