1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
var storePays = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ url: 'index_ajax_dataBaseManagement.php?action=pays'}),
reader: new Ext.data.JsonReader({ root: 'data',totalProperty: 'total', id: 'id'}, [
{name: 'idPays', mapping: 'idPays'},
{name: 'NOM', mapping: 'NOM'}
])
},[
'idPays',
'NOM'
]
);
var sp = new Ext.form.ComboBox
({
store : storePays,
typeAhead : true,
triggerAction : 'all',
lazyRender : true,
emptyText : 'Select a state...',
loadingText: 'Chargement en cours',
valueField: 'idPays',
displayField: 'NOM',
listeners:{
'select': function(){
//// code fonction
}
}
}); |
Partager