PDA

View Full Version : [SOLVED] two depended combos with mode:local, triggerAction:all and remode store!


violinista
06-21-2007, 05:10 PM
hello 2 all,

I noticed some very strange issues when working with two connected combos, and I am posting it here, to discuss-maybe somebody already got it.

here is part of code for first combo:


cmbCombo1.on("select", function(combo,record,index){
cmbCombo2.store.load({params:{testParam:record.id}});
});
This all works well, it loads data regulary on the second combo. Now I go back to first combo, put some OTHER data and type data in second combo. It now filters not only new data which he got from first combo, but all data which he got earlier in the first request! It seems that combo has some caching mechanism which acts combo data to reside in memory...

So, does anybody noticed this issue?

Is there any workaround for this?

10x

tryanDLS
06-21-2007, 06:25 PM
This has been discussed before. Search for snapshot.

violinista
06-22-2007, 03:33 AM
Thank you, Tim. Your advices are so helpful.

I found these threads:
http://extjs.com/forum/showthread.php?t=6592
http://extjs.com/forum/showthread.php?p=31153

...and according to them, I adopted my code:


cmbCombo1.on("select", function(combo,record,index){
cmbCombo2.store.load({params:{testParam:record.id}});
});

cmbCombo2.store.on("load", function(ds,b,c) {
ds.snapshot=ds.data;
});
This is definitely a final solution for two connected combos which are reloaded remotely, and are in local mode. You can type in them, you can select via triggerButton, and all data entered is correct.

Thank you, best regards.