I have nested data from json loaded into a single store based on a Parent model. The Parent model hasMany child model, which in turn has it's own hasMany child model.
It's kinda working - I'm still having trouble accessing the last tier w/o resorting to getAssociatedData from the top tier (.state() works, but .cities() doesn't).....anywho..that's another issue for later)
I set things up this way b/c I didn't want to send multiple requests for related data, esp now that we're using ExtJS 4.x which handles model associations!
I use 2 comboboxes (cascading) for the 2nd and 3rd tier data. On the first combobox, I have a listener handler creating/assigning a store to the second combobox after doing a lookup (the getAssociatedData() call I mentioned above) against my model based on the value chosen in the first combobox. I can make a selection there, and see it's children values used as records in the 2nd combobox list.
works great so far!
Issue: when I change the selection on the 1st combobox, I can see that the 2nd combobox store data is retrieved correctly (via chrome/firebug), but I'm having trouble getting this new info to display in the 2nd combobox (it only displays previous data set).
(Question: Is there a better way for already loaded local data? Since I create/assign w/ each select action on the 1st combobox, I'm worried about memory and orphaned objects each time the user changes their selection.)
PS - I had things working fine in 4.1.x after some research (fix was to clear store filters and delete the lastQuery property). Since then, I've upgraded to 4.2 and am also now using a single model w/ hasMany associations. Current issue looks exactly like the caching issue I had when I started in 4.1, but now my fix no longer works in 4.2. I did notice the combobox store.filter but it isn't behaving as I'd expect (does it apply to local data?)...looking for insight..help!!
thanks in advance!