PDA

View Full Version : Combobox keeps showing "loading" on click



ahsec
13 May 2012, 12:51 AM
I used the old "Sencha Designer" and everything had worked fine, but when I upgraded to the "Architect"
things got wrong with the same config

I have the query set to "local" (i know that remote usually generates that "loading" text)
I also read that the loader object should be change to have loadMask to null or false..neither worked


any advice?

Thanks everyone

jay@moduscreate.com
13 May 2012, 4:31 AM
can you post the code it generated?

ahsec
13 May 2012, 5:29 AM
Yes :-)
this is the code for the combobox




{ xtype: 'combobox',
id: 'd_apps',
itemId: 'd_apps',
loader: 'loadMask:null;',
name: 'app',
fieldLabel: 'Application',
labelAlign: 'right',
labelSeparator: ' ',
labelWidth: 71,
emptyText: 'Choose Application',
size: 30,
editable: false,
displayField: 'app',
queryMode: 'local',
store: 'd_AppsStoreArr',
valueField: 'app'
}

the store is:



Ext.define('MyApp.store.d_AppsStoreArr', {
extend: 'Ext.data.Store',


constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
storeId: 'd_AppsStoreArr',
clearOnPageLoad: false,
proxy: {
type: 'ajax',
reader: {
type: 'array'
}
},
fields: [
{
name: 'app',
type: 'string'
}
]
}, cfg)]);
}
});

thanks :-)

jay@moduscreate.com
14 May 2012, 8:01 AM
Your store config is less than optimal AND your naming of classes is not suggested.

jay@moduscreate.com
14 May 2012, 8:03 AM
Ext.define('Apps', {
extend : 'Ext.data.Model',
fields : [
{
name : 'app',
type : 'string'
}
]
});

Ext.define('MyApp.store.AppsStoreArr', {
extend : 'Ext.data.Store',
autoLoad : true,
storeId : 'd_AppsStoreArr',
clearOnPageLoad : false,
model : 'Apps',
proxy : {
type : 'memory', // changed from ajax
// Where is the data coming from?
reader : {
type : 'array'
}
}
});