Package webit.script.lang

Examples of webit.script.lang.KeyValues


        if (this.inits != null) {
            final Out out = new DiscardOut();
            final GlobalManager myGlobalManager = this.globalManager;
            final Bag globalBag = myGlobalManager.getGlobalBag();
            final Bag constBag = myGlobalManager.getGlobalBag();
            final KeyValues params = KeyValuesUtil.wrap(
                    new String[]{"GLOBAL", "CONST"},
                    new Object[]{globalBag, constBag}
            );
            for (String templateName : StringUtil.toArray(this.inits)) {
                if (this.logger.isInfoEnabled()) {
View Full Code Here


    @SuppressWarnings("unchecked")
    protected Map<String, Object> mergeTemplate(final Context context, boolean export) {
        final Object templateName;
        if ((templateName = templateNameExpr.execute(context)) != null) {
            final KeyValues params;
            final Object paramsObject;
            if (paramsExpr != null
                    && (paramsObject = paramsExpr.execute(context)) != null) {
                if (paramsObject instanceof Map) {
                    params = KeyValuesUtil.wrap((Map) paramsObject);
                } else {
                    throw new ScriptRuntimeException("Template param must be a Map.", paramsExpr);
                }
            } else {
                params = KeyValuesUtil.EMPTY_KEY_VALUES;
            }
            final Template preTemplate = context.template;
            final KeyValues preRootParams = context.rootParams;
            final Object[] preVars = context.vars;
            final VariantIndexer[] preIndexers = context.indexers;
            final int preIndexer = context.indexer;
            try {
                Template template = engine.getTemplate(myTemplateName, String.valueOf(templateName));
View Full Code Here

TOP

Related Classes of webit.script.lang.KeyValues

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.