mangrar
21 Jun 2007, 7:32 AM
Hi all. I've just started with extjs. Today, I've done a form, with 4 combos that has to load some xml data from server side. Each one has a different store like this one:
dsServicios = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '(an url)'
}),
reader: new Ext.data.XmlReader({
record: 'area',
id: 'id',
nombre: 'texto'
}, ['id','texto']),
remoteSort: true
});
I have 3 additional Stores: dsCentros, dsDivisiones and dsPuestos. The url and record are different in each one. Then I have 4 combos each one with its dataStore attribute pointing to one of the Stores. Now, to load data from server I'm doing this:
myCombo1.store.load();
myCombo2.store.load();
myCombo3.store.load();
myCombo4.store.load();
The problem is thah only the last call works, previous calls are interrupted? I'm using Firebug to debug, and I can see 4 request, but only last gets data and myCombo4 gets filled. If I change the order:
myCombo1.store.load();
myCombo2.store.load();
myCombo4.store.load();
myCombo3.store.load();
Now myCombo3 is filled with the data. It seems that each xmlhttprequest() interrupts the previous call, but it has no sense. What I can do??
dsServicios = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '(an url)'
}),
reader: new Ext.data.XmlReader({
record: 'area',
id: 'id',
nombre: 'texto'
}, ['id','texto']),
remoteSort: true
});
I have 3 additional Stores: dsCentros, dsDivisiones and dsPuestos. The url and record are different in each one. Then I have 4 combos each one with its dataStore attribute pointing to one of the Stores. Now, to load data from server I'm doing this:
myCombo1.store.load();
myCombo2.store.load();
myCombo3.store.load();
myCombo4.store.load();
The problem is thah only the last call works, previous calls are interrupted? I'm using Firebug to debug, and I can see 4 request, but only last gets data and myCombo4 gets filled. If I change the order:
myCombo1.store.load();
myCombo2.store.load();
myCombo4.store.load();
myCombo3.store.load();
Now myCombo3 is filled with the data. It seems that each xmlhttprequest() interrupts the previous call, but it has no sense. What I can do??