Hello,

I am new to ExtJs and I face the following problem.
I have two functions that initialize two stores initStore1() et initStore2() and a member variable this.id. This function are called in that order:
Code:
Ext.apply(this, {
id: -1;
})
initStore1();
initStore2();
The content of that function are the following:
Code:
function: initStore1() {
var store: nex Ext.data.Store({
...
listeners: {
load: {
scope: this,
fn: function(store, record) {
...
this.id = record.get('id');
}
}
}
})
}

function: initStore2() {
var store2: nex Ext.data.Store({
...
baseParams: {
...
where: "id" = this.id//here this.id is equal to -1 instead of the value present in store1
},
...
}
})
}
my problem is taht this.id is equal to -1 when initStore2 is called.
How can I initialize this.id so that it will be initialize before initStore2 is called?

Regards