So i got this sub model associate to 1 list item of my view, when I edit this model, the view is re rendered correctly.
But I also got other things parent do when the complete list model change, and the change event is not firing at the aprent level which is weird,
if I manually fire model.change() I see the content updated from the submodel (meaning the parent model as effectively changed).
Is there an automatic way to propagate the change event to the parent model?
Is your “parent” the collection in which the sub-model belongs? If so, the collection will receive a change notification whenever an attributes of the sub-model changes. Here’s an example that demonstrates the model / collection change event:
On the other hand, if your “parent” is not a collection of your sub-model and there’s simply a parent/child relationship, then Backbone has no way to know about the relationship, so you will need to trigger the change event on the parent whenever a child changes. For example:
Here’s a complete list of Backbone events: http://documentcloud.github.com/backbone/#FAQ-events