Results 1 to 3 of 3

Thread: List showing children of hasMany association

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    May 2013
    Vote Rating

    Default Answered: List showing children of hasMany association

    I have a hasMany association between RecipeModel and IngredientModel, named "ingredients".
    User can choose a recipe and put it in the cart, and then customizes the recipe removing ingredients or adding them from a list.
    As for now, there are 4 lists involved.
    List A = list of available recipes
    List B = list of choosen recipes

    List C = list of available ingredients
    List D = list of choosen ingredients

    1. How could I automatically populate List D with ingredients of the selected (tapped or disclosed) record of List B?

    2. How could I implement getRemovedRecords() and getNewRecords to get a list of ingredients added or removed from List D ?

    In order to keep things simple I'm not posting any code, I'll do if anybody needs it to make things clearer.

  2. I solved implementing a nested JSON hence using hierarchical store and models associations, thanks.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts