slacker775
22 May 2010, 10:45 AM
I've created a simple form w/ ED that has two ComboBoxes pulling from a JsonStore (all defined w/ ED). I have it all running via my web server but when I activate the combo to populate, it makes the call to the server, gets the proper JSON response, but nothing winds up in the combo itself. I've tried flipping all kinds of settings around to no avail. I'm pretty certain it's just something stupid that I am overlooking, but I can't find it for the life of me.
Here's the relevant bits of code:
JsonStore:
TEX.store.Office = Ext.extend(Ext.data.JsonStore, {
constructor: function(cfg) {
cfg = cfg || {};
TEX.store.Office.superclass.constructor.call(this, Ext.apply({
storeId: 'locationStore',
root: 'locations',
url: '/location/list',
totalProperty: 'total',
idProperty: 'locationid'
}, cfg));
}
});
new TEX.store.Office();
ComboBox def in the form
{
xtype: 'combo',
fieldLabel: 'Office',
anchor: '100%',
name: 'office',
store: 'locationStore',
triggerAction: 'all',
valueField: 'locationid',
displayField: 'name',
id: 'office'
}
Json Response when I activate the combo
{"locations":[{"locationid":6,"name":"Atlanta"},{"locationid":13,"name":"Boston"},{"locationid":3,"name":"Calgary"},{"locationid":11,"name":"Dallas"},{"locationid":5,"name":"London"},{"locationid":14,"name":"Phoenix"},{"locationid":15,"name":"Raleigh"},{"locationid":2,"name":"South Florida"},{"locationid":1,"name":"Tampa"},{"locationid":4,"name":"Toronto"},{"locationid":12,"name":"Vancouver"}],"total":11}
Here's the relevant bits of code:
JsonStore:
TEX.store.Office = Ext.extend(Ext.data.JsonStore, {
constructor: function(cfg) {
cfg = cfg || {};
TEX.store.Office.superclass.constructor.call(this, Ext.apply({
storeId: 'locationStore',
root: 'locations',
url: '/location/list',
totalProperty: 'total',
idProperty: 'locationid'
}, cfg));
}
});
new TEX.store.Office();
ComboBox def in the form
{
xtype: 'combo',
fieldLabel: 'Office',
anchor: '100%',
name: 'office',
store: 'locationStore',
triggerAction: 'all',
valueField: 'locationid',
displayField: 'name',
id: 'office'
}
Json Response when I activate the combo
{"locations":[{"locationid":6,"name":"Atlanta"},{"locationid":13,"name":"Boston"},{"locationid":3,"name":"Calgary"},{"locationid":11,"name":"Dallas"},{"locationid":5,"name":"London"},{"locationid":14,"name":"Phoenix"},{"locationid":15,"name":"Raleigh"},{"locationid":2,"name":"South Florida"},{"locationid":1,"name":"Tampa"},{"locationid":4,"name":"Toronto"},{"locationid":12,"name":"Vancouver"}],"total":11}