PDA

View Full Version : JsonStore problem



dragec
1 Aug 2011, 12:18 AM
Hi all. I have some problems with loading data into JsonStore:


var korisnikStore = new Ext.data.JsonStore({
url : 'korisnik.json',
baseParams : {
korisnikId : 1
},
fields : ['KORISNIK_ID'],
autoLoad : true,
listeners : {
load : {
fn: function(e) {
console.log(e);
}
}
}
}); Json response:

{"3":0,"2":1,"1":1,"KORISNIK_ID":1}But korisnikStore.data.items.length is 0, and there are no data in it. I also tried with type: 'float', but nothing changes.

I see request/response in firebug and it is ok, but store doesn't get populated with anything. What could be wrong?