backbone.js - Backbone collections detach from models on reset/fetch -


i developing application in there 2 views.

view 1 list of documents, presenting vital details view 2 document it's self. editable.

the application multi-user. app polls server updates collection.

the problem when collection (view 1) refreshed (.fetch) unbinds events child models. including 1 open in view 2. before fetch, changes in document (model) reflected in list (collection), after fetch document (now old model) unrelated list (collection).

after looking @ backbone.js source, intended behavior. there work around solution this?

yes, common issue. collection reseted , references refreshed, if target same models before.

i think nice idea implement collection.update() method in opposition of collection.fetch().

check tread approaches deal behavior: backbone.js collection upsert?


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -