kgilb
25 Oct 2010, 10:37 AM
Ext.regModel("Symbols", {
fields: [
{ name: "Sym" }
]
});
store = new Ext.data.Store({
model: "Symbols",
filterOnLoad: false,
proxy: new Ext.data.AjaxProxy({
url: 'Massive.ashx?service=WL&BFCID=13',
reader: {
type: "json",
root: ""
}
})
});
var symList = new Ext.List({
title: 'Symbols',
itemSelector: 'div.wlsymbol',
singleSelect: true,
scroll: 'vertical',
tpl: [
'<tpl for="."><div class="wlsymbol">{Sym}</div></tpl>',
],
flex: 1,
dock: 'left',
clearSelectionOnDeactivate: false,
store: store
});
store.load();
I'm using the code code above to fill a list with JSON data from the server. The server response is about 300 ms but it takes up to 5+ seconds for the list to show anything. It doesn't seem to matter if the list has 5 items or 100 item, it takes far too long to display the data. If I don't use a data store and I load the data using symList.update() the data is displayed instantly. I'm testing the code in Safari. Is there something i'm doing wrong? Do I need to call a refresh method on the list?
fields: [
{ name: "Sym" }
]
});
store = new Ext.data.Store({
model: "Symbols",
filterOnLoad: false,
proxy: new Ext.data.AjaxProxy({
url: 'Massive.ashx?service=WL&BFCID=13',
reader: {
type: "json",
root: ""
}
})
});
var symList = new Ext.List({
title: 'Symbols',
itemSelector: 'div.wlsymbol',
singleSelect: true,
scroll: 'vertical',
tpl: [
'<tpl for="."><div class="wlsymbol">{Sym}</div></tpl>',
],
flex: 1,
dock: 'left',
clearSelectionOnDeactivate: false,
store: store
});
store.load();
I'm using the code code above to fill a list with JSON data from the server. The server response is about 300 ms but it takes up to 5+ seconds for the list to show anything. It doesn't seem to matter if the list has 5 items or 100 item, it takes far too long to display the data. If I don't use a data store and I load the data using symList.update() the data is displayed instantly. I'm testing the code in Safari. Is there something i'm doing wrong? Do I need to call a refresh method on the list?