View Full Version : Bug in JsonStore ?

Henrik Rutzou
1 Aug 2011, 10:48 AM
This is at Ext JS 3.3.0

I have a remote store in a Combo, it is really quite simple but is generic because the description comes from the server in the responce:

,store:new Ext.data.JsonStore({

I can reload the JsonStore in a listener ( combo.store.reload({params:{query:"R1R1ID"}}); ) and the servers JSON response is the following:

{"metaData":{"totalProperty":"totalRows","root":"rows","id":"XVXRID","fields":[{"name":"RRN"},{"name":"XVXRID"},{"name":"select"}]},"totalRows":1,"rows":[{"RRN":1126,"XVXRID":"R1R1ID","select":"R1R1ID Dimension Project"}]}

It really works fine, combo values are updated when it is loaded or selected.

But now I am trying to read what's in the JsonStore in a listener in the combo (change) and here comes trouble because it is trowing tons of code back:

,change: {
fn:function(combo, value) {
alert('Total records: '+combo.store.getCount()); // return a nice alert with 1 record in the store
alert(inspect(combo.store.getAt(0), 5, 1)); // should return a record but returns much more

Here is the result of combo.store.getAt(0) ....