src/aria/templates/CSSCtxt.js
function (cfg) {
            if (!ariaCoreJsonValidator.normalize({
                json : cfg,
                beanName : "aria.templates.CfgBeans.InitCSSTemplateCfg"
            })) {
                return false;
            }
            this._cfg = cfg;

            // Get an insatnce of the CSS template
            var tpl = Aria.getClassInstance(cfg.classpath);
            if (!tpl) {
                this.$logError(this.TEMPLATE_CONSTR_ERROR, [cfg.classpath]);
                return false;
            }
            this._tpl = tpl;

            // Main macro (not configurable)
            cfg.macro = this.checkMacro({
                name : "main",
                args : cfg.args
            });
            this.tplClasspath = cfg.classpath;

            // We no longer create new methods in a closure each time a new instance of a template is created,
            // instead we use the interface mechanism to expose methods to the template and prevent access to the
            // template context
            ariaTemplatesICSS.call(tpl, this);

            // TEMPORARY PERF IMPROVMENT : interface on these two functions results in poor performances.
            // Investigation ongoing on interceptors

            var oSelf = this;

            tpl.__$write = function () {
                return oSelf.__$write.apply(oSelf, arguments);
            };

            if (!tpl.__$initTemplate()) {
                return false;
            }
            this.__loadLibs(tpl.__$csslibs, "csslibs");
            return true;
        }
function (cfg) {
            if (!ariaCoreJsonValidator.normalize({
                json : cfg,
                beanName : "aria.templates.CfgBeans.InitCSSTemplateCfg"
            })) {
                return false;
            }
            this._cfg = cfg;

            // Get an insatnce of the CSS template
            var tpl = Aria.getClassInstance(cfg.classpath);
            if (!tpl) {
                this.$logError(this.TEMPLATE_CONSTR_ERROR, [cfg.classpath]);
                return false;
            }
            this._tpl = tpl;

            // Main macro (not configurable)
            cfg.macro = this.checkMacro({
                name : "main",
                args : cfg.args
            });
            this.tplClasspath = cfg.classpath;

            // We no longer create new methods in a closure each time a new instance of a template is created,
            // instead we use the interface mechanism to expose methods to the template and prevent access to the
            // template context
            ariaTemplatesICSS.call(tpl, this);

            // TEMPORARY PERF IMPROVMENT : interface on these two functions results in poor performances.
            // Investigation ongoing on interceptors

            var oSelf = this;

            tpl.__$write = function () {
                return oSelf.__$write.apply(oSelf, arguments);
            };

            if (!tpl.__$initTemplate()) {
                return false;
            }
            this.__loadLibs(tpl.__$csslibs, "csslibs");
            return true;
        }
function ( cfg ) { if ( ! ariaCoreJsonValidator . normalize ( { json : cfg , beanName : "aria.templates.CfgBeans.InitCSSTemplateCfg" } ) ) { return false ; } this . _cfg = cfg ; // Get an insatnce of the CSS template var tpl = Aria . getClassInstance ( cfg . classpath ) ; if ( ! tpl ) { this . $logError ( this . TEMPLATE_CONSTR_ERROR , [ cfg . classpath ] ) ; return false ; } this . _tpl = tpl ; // Main macro (not configurable) cfg . macro = this . checkMacro ( { name : "main" , args : cfg . args } ) ; this . tplClasspath = cfg . classpath ; // We no longer create new methods in a closure each time a new instance of a template is created, // instead we use the interface mechanism to expose methods to the template and prevent access to the // template context ariaTemplatesICSS . call ( tpl , this ) ; // TEMPORARY PERF IMPROVMENT : interface on these two functions results in poor performances. // Investigation ongoing on interceptors var oSelf = this ; tpl . __$write = function ( ) { return oSelf . __$write . apply ( oSelf , arguments ) ; } ; if ( ! tpl . __$initTemplate ( ) ) { return false ; } this . __loadLibs ( tpl . __$csslibs , "csslibs" ) ; return true ; }
Init the CSS template with the given configuration.
@param {aria.templates.CfgBeans:InitCSSTemplateCfg} cfg Template context configuration
@return {Boolean} true if there was no error
Init the CSS template with the given configuration .