Package jetbrick.template.web

Examples of jetbrick.template.web.JetWebContext$EnumeratedMap


    public void render() {
        if (JetWebEngineLoader.unavailable()) {
            JetWebEngineLoader.setServletContext(JFinal.me().getServletContext());
        }

        JetContext context = new JetWebContext(request, response);
        JetTemplate template = JetWebEngineLoader.getJetEngine().getTemplate(view);
        try {
            template.render(context, response.getOutputStream());
        } catch (IOException e) {
            throw ExceptionUtils.uncheck(e);
View Full Code Here


        response.setCharacterEncoding(engine.getConfig().getOutputEncoding());
        if (contentType != null) {
            response.setContentType(contentType);
        }

        JetContext context = new JetWebContext(request, response);
        JetTemplate template = engine.getTemplate(path);
        template.render(context, response.getOutputStream());
    }
View Full Code Here

        if (pathInfo != null && pathInfo.length() > 0) {
            uri = uri + pathInfo;
        }
        try {
            JetTemplate template = engine.getTemplate(uri);
            JetContext context = new JetWebContext(request, response);
            template.render(context, response.getOutputStream());
        } catch (ResourceNotFoundException e) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND, "Template not found: " + uri);
        }
    }
View Full Code Here

        if (pathInfo != null && pathInfo.length() > 0) {
            uri = uri + pathInfo;
        }
        try {
            JetTemplate template = engine.getTemplate(uri);
            JetContext context = new JetWebContext(req, resp);
            template.render(context, resp.getOutputStream());
        } catch (ResourceNotFoundException e) {
            resp.sendError(HttpServletResponse.SC_NOT_FOUND, "Template not found: " + uri);
        }
    }
View Full Code Here

        super(value);
    }

    @Override
    public void render(HttpServletRequest req, HttpServletResponse resp, Object obj) throws Throwable {
        JetContext context = new JetWebContext(req, resp);
        JetTemplate template = JetWebEngineLoader.getJetEngine().getTemplate(evalPath(req, obj));
        try {
            template.render(context, resp.getOutputStream());
        } catch (IOException e) {
            throw Lang.wrapThrow(e);
View Full Code Here

public class JetTemplateView extends AbstractTemplateView {

    @Override
    protected void renderMergedTemplateModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
        JetContext context = new JetWebContext(request, response, model);
        JetTemplate template = JetWebEngineLoader.getJetEngine().getTemplate(getUrl());
        template.render(context, response.getOutputStream());
    }
View Full Code Here

        if (JetWebEngineLoader.unavailable()) {
            ServletContext servletContext = (ServletContext) model.get(ServletActionContext.SERVLET_CONTEXT);
            JetWebEngineLoader.setServletContext(servletContext);
        }

        JetContext context = new JetWebContext(request, response, null);
        context.put("action", ai.getAction());
        context.put("valueStack", model);
        JetTemplate template = JetWebEngineLoader.getJetEngine().getTemplate(location);
        template.render(context, response.getOutputStream());
    }
View Full Code Here

TOP

Related Classes of jetbrick.template.web.JetWebContext$EnumeratedMap

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.