Package ca.simplegames.micro.viewers

Examples of ca.simplegames.micro.viewers.ViewRenderer


        String klass = (String) engineConfig.get("class");
        Map<String, Object> options = (Map<String, Object>) engineConfig.get("options");
        boolean isDefaultEngine = StringUtils.defaultString(engineConfig.get("default"),
                "false").trim().equalsIgnoreCase("true");

        ViewRenderer engine = null;
        try {
            engine = (ViewRenderer) ClassUtilities.loadClass(klass).newInstance();
            engine.loadConfiguration(site, options);
            engines.put(name, engine);

            if (isDefaultEngine) {
                defaultEngine = engine;
                if (site.getRepositoryManager() != null) {
View Full Code Here


            if (view != null && !CollectionUtils.isEmpty(view.getControllers())) {
                executeViewControllers(view.getControllers(), context);
            }

            ViewRenderer engine = context.getSiteContext().getTemplateEnginesManager().getEngine(templateEngineName);

            if (model != null && !model.isEmpty()) {
                context.getMap().putAll(model);
            }

            engine.render(path, repository, context, writer);

            return writer.toString();

        } finally {
            if (view != null && !view.getFiltersAfter().isEmpty()) {
View Full Code Here

TOP

Related Classes of ca.simplegames.micro.viewers.ViewRenderer

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.