Results 1 to 5 of 5

Thread: Child viewModels communication via parent viewModel

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    42
    Answers
    2

    Default Child viewModels communication via parent viewModel

    I know that all data from parent viewModel are accessible for child component. But what if there is reversed situation? For example, I have one main panel with viewModel and two child panels also with viewModels. The first child panel contains combobox, another child panel is a grid with store that has binding filter. When I change combobox value store must reload. Store filter has access to parent viewModel and can be bound to its data.
    But how can I raise data from child to parent viewModel?

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Hi,

    There's not a way to do that currently, though there is some discussion amongst the engineers as to how to allow bindings to leapfrog an immediate viewModel.

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    42
    Answers
    2

    Default

    Well, so why does it work https://fiddle.sencha.com/#fiddle/dcp. I got confused finally. I think it shouldn't work. Why if I change any child textfield then parent textfield is changed too? Where this behavior is documented?


  4. #4
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    It's possible I'm not on the same page with what you're trying to do with your initial post.
    Can you post a test case demonstrating your initial setup and the issue you're seeing there?

  5. #5
    Sencha Premium Member
    Join Date
    Nov 2010
    Posts
    53
    Answers
    2

    Default

    Hi everyone. Check out the temporary solution here https://www.sencha.com/forum/showthr...ish-properties

Posting Permissions

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