Madiyana
14 Nov 2012, 3:28 AM
Hi,
I am a new user in ExtJS4 and I have a problem that i can't resolve..
I wanna put in a function this code :
var storeLD01_Objet = Ext.create('Ext.data.Store', {
fields :['id', 'libelle'],
labelWidth :150,
proxy: {
type: 'ajax',
url: '/value/TypeAmenrecherche/search',
reader: {
type: 'json',
root: 'elt'
}
},
listeners: {
'load': function(store, operation, options){
this.insert(0, {id:'--', libelle:'--'});
}
},
autoLoad: true
});
My objective is to have a function like :
function loadstore(link){
...
url: '/gtrte/link/search',
...
} because I want have a dynamic store who change with my value "link"
I am a new user in ExtJS4 and I have a problem that i can't resolve..
I wanna put in a function this code :
var storeLD01_Objet = Ext.create('Ext.data.Store', {
fields :['id', 'libelle'],
labelWidth :150,
proxy: {
type: 'ajax',
url: '/value/TypeAmenrecherche/search',
reader: {
type: 'json',
root: 'elt'
}
},
listeners: {
'load': function(store, operation, options){
this.insert(0, {id:'--', libelle:'--'});
}
},
autoLoad: true
});
My objective is to have a function like :
function loadstore(link){
...
url: '/gtrte/link/search',
...
} because I want have a dynamic store who change with my value "link"