title: Backbone.js / Marionette - Updating region triggers infinite loop, page refresh
body: <p>I'm not entirely certain what is happening here. I have a module, that is responsible for displaying the navigation in a region on my page. For whatever reason, when I trigger the display (<code>Manager.trigger("navigation:show");</code>) the entire page refreshes, and continues to refresh ad infinitum.</p>
  
  <p>I've been staring at this for a while trying to track down exactly what is going on, but figure it best I step away for a moment. I assume there is some recursion occurring somewhere, but thus far I haven't been able to track it down.</p>
  
  <p><strong>navigation_app.js</strong></p>
  
  <pre><code>Manager.module("NavigationApp", function(NavigationApp, Manager, Backbone, Marionette, $, _) {
      NavigationApp.Router = Marionette.AppRouter.extend({
          appRoutes: {
          }
      });
  
      var API = {
          showNavigation: function() {
              NavigationApp.Show.Controller.showNavigation();
          },
      };
  
      Manager.on("navigation:show", function() {
          API.showNavigation();
      });
  
      Manager.addInitializer(function() {
          new NavigationApp.Router({
              controller: API
          });
      });
  });
  </code></pre>
  
  <p><strong>navigation_controller.js</strong></p>
  
  <pre><code>Manager.module("NavigationApp.Show", function(Show, Manager, Backbone, Marionette, $, _) {
      Show.Controller = {
          showNavigation: function() {    
              console.log("showNavigation() called");
              var navigation = Manager.request("navigation:entities");
  
              var navigationView = new Manager.NavigationApp.Show.NavigationView({
                  collection: navigation
              }); 
  
              Manager.navigationRegion.show(navigationView);
          }
      }
  });
  </code></pre>
  
  <p><strong>navigation_view.js</strong></p>
  
  <pre><code>Manager.module("NavigationApp.Show", function(Show, Manager, Backbone, Marionette, $, _) {
      Show.NavigationItemView = Marionette.ItemView.extend({
          template: "#navigation-item-view",
  
          events: {
          },
      });
  
      Show.NavigationView = Backbone.Marionette.CompositeView.extend({
          template: "#navigation-view",
          itemView: Show.NavigationItemView,
      });
  });
  </code></pre>
  
  <p><strong>Callstack</strong> (This just repeats, the page reloads, and it repeats again)</p>
  
  <pre><code>x.Callbacks.c
  x.Callbacks.p.fireWith
  k
  x.ajaxTransport.send.r
  x.ajaxTransport.send
  x.extend.ajax
  x.extend._evalUrl
  x.fn.extend.domManip
  x.fn.extend.append
  c.extend.open
  c.extend.show
  Show.Controller.showNavigation
  </code></pre>