{"action":"closed","issue":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2604","labels_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2604/labels{/name}","comments_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2604/comments","events_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2604/events","html_url":"https://github.com/marionettejs/backbone.marionette/issues/2604","id":89266398,"number":2604,"title":"Nested View Structures - Clarification","user":{"login":"bazineta","id":564060,"avatar_url":"https://avatars.githubusercontent.com/u/564060?v=3","gravatar_id":"","url":"https://api.github.com/users/bazineta","html_url":"https://github.com/bazineta","followers_url":"https://api.github.com/users/bazineta/followers","following_url":"https://api.github.com/users/bazineta/following{/other_user}","gists_url":"https://api.github.com/users/bazineta/gists{/gist_id}","starred_url":"https://api.github.com/users/bazineta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazineta/subscriptions","organizations_url":"https://api.github.com/users/bazineta/orgs","repos_url":"https://api.github.com/users/bazineta/repos","events_url":"https://api.github.com/users/bazineta/events{/privacy}","received_events_url":"https://api.github.com/users/bazineta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-18T11:22:09Z","updated_at":"2015-06-27T04:12:04Z","closed_at":"2015-06-27T04:12:04Z","body":"In the documentation section that describes how to efficiently render nested view structures:\r\n\r\nhttp://marionettejs.com/docs/v2.4.2/marionette.layoutview.html#efficient-nested-view-structures\r\n\r\nIt describes LayoutView showing children in onBeforeShow().  When attempting this with a CollectionView with LayoutView children, the documented technique does seem to work properly when the view is first rendered.  However, thereafter, any fetch() on the collection that results in add operations results in exceptions in the LayoutView's onBeforeShow(), when the LayoutView attempts to render children into regions denoted by DOM elements that don't exist yet.\r\n\r\nI'm curious if the technique described in the documentation is specific only to use of LayoutViews all the way down, and thus having a CollectionView in play is an unsupported case, or if this is actually intended to work.  While it seems that onShow() is always safe, at this point I can't see how using onBeforeShow(), as documented, could possibly be a proper course of action in this case."}}