PDA

View Full Version : combobox directstore forever loading



maneljn
14 Feb 2010, 3:46 AM
i have a combobox, when i click, appears the loading text, returns data , but it remains "loading" forever

// Store, aplicacions disponibles
this.storeAplicacions = new Ext.data.DirectStore({
storeId: 'storeAplicacions',
autoDestroy: true,
autoLoad: false,
directFn: Ext.CesiDirect.CesiBase_Aplicacions.ObtenirTotes,
reader: new Ext.data.JsonReader({
//totalProperty: 'totalCount',
idProperty: 'id',
root: 'aplicacions'
}, [{
name: 'id'
},{
name: 'nom_intern'
}]),
});

// Combobox per seleccionar la aplicacio
this.cbAplicacions = new Ext.form.ComboBox({
store: this.storeAplicacions,
displayField: 'nom_intern',
valueField: 'id',
hiddenName: 'id', // Necessari perque el submit passi el value i no el display
typeAhead: true,
mode: 'remote',
forceSelection: true,
triggerAction: 'all',
emptyText: 'Seleccioni aplicació...',
selectOnFocus: true,
editable: false,
width: 140,
iconCls: 'no-icon'
});


the return from firebug

{"type":"rpc","tid":2,"action":"CesiBase_Aplicacions","method":"ObtenirTotes","result":{"ok":true,"aplicacions":[{"id":"3","nom_intern":"prova prova"},{"id":"4","nom_intern":"prova prova 4444"}]}}