src/aria/pageEngine/SiteRootModule.js
function (pageId, modulesDescription, callback) {
            var definitions = [];
            var descriptions = [];
            var modules, refpath, isCommon, def;
            var loopArray = [{
                        modules : modulesDescription.page,
                        isCommon : false
                    }, {
                        modules : modulesDescription.common,
                        isCommon : true
                    }];

            for (var j = 0; j < 2; j++) {
                modules = loopArray[j].modules;
                isCommon = loopArray[j].isCommon;
                for (var i = 0, len = modules.length; i < len; i += 1) {
                    refpath = this.buildModuleRefpath(modules[i].refpath, isCommon, pageId);
                    if (this._utils.resolvePath(refpath, this) == null) {
                        def = ariaUtilsJson.copy(modules[i]);
                        def.refpath = refpath;
                        definitions.push({
                            classpath : def.classpath,
                            initArgs : this._injectPageEngine(def.initArgs),
                            refpath : refpath
                        });
                        descriptions.push(def);
                        this._addRefpath(pageId, isCommon, refpath);
                    }
                }
            }

            this.loadSubModules(definitions, {
                fn : this.createServices,
                scope : this,
                resIndex : -1,
                args : {
                    pageId : pageId,
                    callback : callback,
                    modules : descriptions
                }
            });
        }
function (pageId, modulesDescription, callback) {
            var definitions = [];
            var descriptions = [];
            var modules, refpath, isCommon, def;
            var loopArray = [{
                        modules : modulesDescription.page,
                        isCommon : false
                    }, {
                        modules : modulesDescription.common,
                        isCommon : true
                    }];

            for (var j = 0; j < 2; j++) {
                modules = loopArray[j].modules;
                isCommon = loopArray[j].isCommon;
                for (var i = 0, len = modules.length; i < len; i += 1) {
                    refpath = this.buildModuleRefpath(modules[i].refpath, isCommon, pageId);
                    if (this._utils.resolvePath(refpath, this) == null) {
                        def = ariaUtilsJson.copy(modules[i]);
                        def.refpath = refpath;
                        definitions.push({
                            classpath : def.classpath,
                            initArgs : this._injectPageEngine(def.initArgs),
                            refpath : refpath
                        });
                        descriptions.push(def);
                        this._addRefpath(pageId, isCommon, refpath);
                    }
                }
            }

            this.loadSubModules(definitions, {
                fn : this.createServices,
                scope : this,
                resIndex : -1,
                args : {
                    pageId : pageId,
                    callback : callback,
                    modules : descriptions
                }
            });
        }
function ( pageId , modulesDescription , callback ) { var definitions = [ ] ; var descriptions = [ ] ; var modules , refpath , isCommon , def ; var loopArray = [ { modules : modulesDescription . page , isCommon : false } , { modules : modulesDescription . common , isCommon : true } ] ; for ( var j = 0 ; j < 2 ; j ++ ) { modules = loopArray [ j ] . modules ; isCommon = loopArray [ j ] . isCommon ; for ( var i = 0 , len = modules . length ; i < len ; i += 1 ) { refpath = this . buildModuleRefpath ( modules [ i ] . refpath , isCommon , pageId ) ; if ( this . _utils . resolvePath ( refpath , this ) == null ) { def = ariaUtilsJson . copy ( modules [ i ] ) ; def . refpath = refpath ; definitions . push ( { classpath : def . classpath , initArgs : this . _injectPageEngine ( def . initArgs ) , refpath : refpath } ) ; descriptions . push ( def ) ; this . _addRefpath ( pageId , isCommon , refpath ) ; } } } this . loadSubModules ( definitions , { fn : this . createServices , scope : this , resIndex : - 1 , args : { pageId : pageId , callback : callback , modules : descriptions } } ) ; }
Load a list of page sub modules. These modules exists only in this page and should be loaded and initialized
connecting their datamodel to the defined bindings
@param {String} pageId Id of the page, used to prefix a refpath
@param {Object} modulesDescriptions
<ul>
<li> page: List of page-specific modules described by aria.templates.CfgBeans.SubModuleDefinition</li>
<li> common: List of common modules described by aria.templates.CfgBeans.SubModuleDefinition</li>
</ul>
@param {aria.core.CfgBeans:Callback} callback Called after the submodules are initialized
Load a list of page sub modules . These modules exists only in this page and should be loaded and initialized connecting their datamodel to the defined bindings