Model to Model
Hi,
What is the best way to establish communication between model?
Let's say I have to models, one for the main view with all the
configuration values, and another for one sub component. If the sub
component model needs to perform an action based on one of the
settings that is in the main model should I inject the main model
into it?
Tks.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Till Schneidereit on 13 Mar, 2010 02:16 PM
I'd recommend using a command to update the sub component model.
Let your main model dispatch an even to which you bind a command. Into
this command, you inject both models and apply whatever updates you
need to the sub component model.