1. #1
    Sencha User
    Join Date
    Jun 2012
    Location
    Virginia, USA
    Posts
    40
    Vote Rating
    1
    rtirbany is on a distinguished road

      0  

    Default Answered: ExtJS 4.2 Nested data with cascading combobox issue

    Answered: ExtJS 4.2 Nested data with cascading combobox issue


    Hi,
    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.
    (think country-state-city)
    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!
    Last edited by rtirbany; 14 May 2013 at 6:03 PM. Reason: clean up

  2. So in the first combo, you get the record when one is selected and you execute the getter which returns a data Store and are binding it to the 2nd combo?

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3466
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So in the first combo, you get the record when one is selected and you execute the getter which returns a data Store and are binding it to the 2nd combo?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Jun 2012
    Location
    Virginia, USA
    Posts
    40
    Vote Rating
    1
    rtirbany is on a distinguished road

      0  

    Default


    hey man, just wanted to say thanks again for the tip. Right after you mentioned binding, I couldn't believe that I hadn't attempted it earlier...Great meeting you the other night, hope you enjoyed your trip out this way and see you in Orlando!

    Raj

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi