I have a Layout
that has several tabs. Clicking one of these tabs will show
the appropriate composite view in the page's content region
. After navigating back and forth between different tabs I noticed that the composite views have lost their native bindings to render on collection reset and model changes.
Is there a way I should be rebinding the events being used in _initialEvents
of a composite view when showing a view for a second time, or should I be creating a new composite view every I show
a tab?
Currently I am creating all my views in initialize
of my Layout
and then using show
with the view when a tab is clicked.
initialize: function(){
_.bindAll(this);
// Tabs
this.places_page = new Places_Layout();
},
show_places_page: function(){
this.content.show(this.places_page);
this.places_page.delegateEvents();
},