src/aria/pageEngine/PageEngine.js
function (siteConfig) {
            var valid = this.isConfigValid(siteConfig, "aria.pageEngine.CfgBeans.Site", this.INVALID_SITE_CONFIGURATION);
            if (!valid) {
                return;
            }
            var helper = new ariaPageEngineUtilsSiteConfigHelper(siteConfig);
            this._siteConfigHelper = helper;

            // Initialization
            var appData = helper.getAppData();
            appData.menus = appData.menus || {};

            var initArgs = {
                appData : appData,
                pageEngine : this._wrapper
            };

            var rootModuleConfig = this._config.rootModule;
            if (rootModuleConfig) {
                var customControllerClasspath = rootModuleConfig.classpath;
                if (rootModuleConfig.initArgs) {
                    ariaUtilsJson.inject(initArgs, rootModuleConfig.initArgs);
                }
                var that = this;
                Aria.load({
                    classes : [customControllerClasspath],
                    oncomplete : function () {
                        if (Aria.getClassRef(customControllerClasspath).classDefinition.$extends !== "aria.pageEngine.SiteRootModule") {
                            that._errorCallback([that.INVALID_ROOTMODULE_PARENT]);
                            return;
                        }
                        that._createModuleCtrl(rootModuleConfig);
                    },
                    onerror : this._getErrorCallbackConfig([this.MISSING_DEPENDENCIES])
                });
            } else {
                this._createModuleCtrl({
                    classpath : "aria.pageEngine.SiteRootModule",
                    initArgs : initArgs
                });
            }

        }
function (siteConfig) {
            var valid = this.isConfigValid(siteConfig, "aria.pageEngine.CfgBeans.Site", this.INVALID_SITE_CONFIGURATION);
            if (!valid) {
                return;
            }
            var helper = new ariaPageEngineUtilsSiteConfigHelper(siteConfig);
            this._siteConfigHelper = helper;

            // Initialization
            var appData = helper.getAppData();
            appData.menus = appData.menus || {};

            var initArgs = {
                appData : appData,
                pageEngine : this._wrapper
            };

            var rootModuleConfig = this._config.rootModule;
            if (rootModuleConfig) {
                var customControllerClasspath = rootModuleConfig.classpath;
                if (rootModuleConfig.initArgs) {
                    ariaUtilsJson.inject(initArgs, rootModuleConfig.initArgs);
                }
                var that = this;
                Aria.load({
                    classes : [customControllerClasspath],
                    oncomplete : function () {
                        if (Aria.getClassRef(customControllerClasspath).classDefinition.$extends !== "aria.pageEngine.SiteRootModule") {
                            that._errorCallback([that.INVALID_ROOTMODULE_PARENT]);
                            return;
                        }
                        that._createModuleCtrl(rootModuleConfig);
                    },
                    onerror : this._getErrorCallbackConfig([this.MISSING_DEPENDENCIES])
                });
            } else {
                this._createModuleCtrl({
                    classpath : "aria.pageEngine.SiteRootModule",
                    initArgs : initArgs
                });
            }

        }
function ( siteConfig ) { var valid = this . isConfigValid ( siteConfig , "aria.pageEngine.CfgBeans.Site" , this . INVALID_SITE_CONFIGURATION ) ; if ( ! valid ) { return ; } var helper = new ariaPageEngineUtilsSiteConfigHelper ( siteConfig ) ; this . _siteConfigHelper = helper ; // Initialization var appData = helper . getAppData ( ) ; appData . menus = appData . menus || { } ; var initArgs = { appData : appData , pageEngine : this . _wrapper } ; var rootModuleConfig = this . _config . rootModule ; if ( rootModuleConfig ) { var customControllerClasspath = rootModuleConfig . classpath ; if ( rootModuleConfig . initArgs ) { ariaUtilsJson . inject ( initArgs , rootModuleConfig . initArgs ) ; } var that = this ; Aria . load ( { classes : [ customControllerClasspath ] , oncomplete : function ( ) { if ( Aria . getClassRef ( customControllerClasspath ) . classDefinition . $extends !== "aria.pageEngine.SiteRootModule" ) { that . _errorCallback ( [ that . INVALID_ROOTMODULE_PARENT ] ) ; return ; } that . _createModuleCtrl ( rootModuleConfig ) ; } , onerror : this . _getErrorCallbackConfig ( [ this . MISSING_DEPENDENCIES ] ) } ) ; } else { this . _createModuleCtrl ( { classpath : "aria.pageEngine.SiteRootModule" , initArgs : initArgs } ) ; } }
Callback for the site configuration module controller. Initialize whatever is needed by the root module
controller, like the data model and the router
@param {aria.pageEngine.CfgBeans:Site} siteConfig Site configuration
Callback for the site configuration module controller . Initialize whatever is needed by the root module controller like the data model and the router