var render = require('../application/render');
var Backbone = require('backbone');
module.exports = Backbone.Router.extend({
  /**
   * Render the compoennt into the page content.
   */
  _pageContent(component, options){
    return render(component, '[data-focus="page-content"]', options);
  }
});

@@ -80,49 +80,1494 @@
 ');%0A
-module.exports = Backbone.Router.extend(%7B
+var ArgumentNullException = require('../exception/ArgumentNullException');%0Avar message = require('../message');%0Avar userHelper = require('../user');%0Amodule.exports = Backbone.Router.extend(%7B%0A  noRoleRoute: 'home',%0A  route(route, name, callback) %7B%0A    var router = this;%0A    if (!callback)%7B%0A      callback = this%5Bname%5D;%0A    %7D%0A    if(callback === undefined %7C%7C callback === null)%7B%0A      throw new ArgumentNullException(%60The route callback seems to be undefined, please check your router file for your route: $%7Bname%7D%60);%0A    %7D%0A    var customWrapperAroundCallback = ()=%3E%7B%0A      var currentRoute = route;%0A      //The default route is the noRoleRoute by default%0A      if(currentRoute === '')%7B%0A        currentRoute = router.noRoleRoute;%0A      %7D%0A      var routeName = '';//siteDescriptionBuilder.findRouteName(currentRoute);%0A      var routeDescciption = %7Broles: %5B'DEFAULT_ROLE'%5D%7D;//siteDescriptionBuilder.getRoute(routeName);%0A      if((routeDescciption === undefined && currentRoute !== '') %7C%7C !userHelper.hasRole(routeDescciption.roles))%7B%0A        message.addErrorMessage('application.noRights');%0A        return Backbone.history.navigate('', true);%0A      %7Delse %7B%0A        //Rendre all the notifications in the stack.%0A        backboneNotification.renderNotifications();%0A      %7D%0A      //console.log('routeObject', siteDescriptionBuilder.getRoute(n));%0A      callback.apply(router, arguments);%0A%0A  %7D;%0A    return Backbone.Router.prototype.route.call(this, route, name, customWrapperAroundCallback);%0A  %7D,
 %0A  /

Add error messages when the route is unknown