samedi 1 novembre 2014

Extjs Combobox remote query double loading

I have a problem with my combobox. Combobox load when i open my form panel and he get a query send by database. But when i click a trigger icon, he do the same query. I would to disable the query when i click a trigger icon.

My combobox code:



HTML Code:



xtype: 'combobox',
fieldLabel: 'Operation',
id: 'combotypeoperation',
store: 'TypeOperations',
queryMode: 'remote',
displayField: 'libelle',
editable: false,
valueField: 'idTypeOperation',
listConfig: {
loadMask: false
},
listeners: {
render: function() {
this.store.load();
}
}

TypeOperations store code:


HTML Code:



Ext.define(
'SecureDT.store.TypeOperations',
{
extend: 'Ext.data.Store',
requires: [
'SecureDT.model.TypeOperation'
],
model: 'SecureDT.model.TypeOperation',

proxy: {
type: 'ajax',
timeout: 120000,
url: 'secureDT/typeOperation/findAll.json',
reader: {
type: 'json',
root: 'data'
}
},
listeners: {
load: function() {
var combo = Ext.getCmp('combotypeoperation');
var recordSelected = combo.getStore().getAt(0).get('idTypeOperation');
combo.setValue(recordSelected);
}
}
}
);





Extjs Combobox remote query double loading

Aucun commentaire:

Enregistrer un commentaire