Examples of FreeMarkerService


Examples of org.apache.turbine.services.freemarker.FreeMarkerService

     * @param data Turbine information.
     * @exception Exception, a generic exception.
     */
    protected void doBuildBeforeAction(RunData data) throws Exception
    {
        FreeMarkerService fm = (FreeMarkerService)
            TurbineServices.getInstance()
                .getService(FreeMarkerService.SERVICE_NAME);
        data.getTemplateInfo().setTemplateContext(
            FreeMarkerService.CONTEXT, fm.getContext(data));
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

        // TemplateInfo.
        SimpleHash context = (SimpleHash)data.getTemplateInfo()
            .getTemplateContext(FreeMarkerService.CONTEXT);
        if (context == null)
        {
            FreeMarkerService fm = (FreeMarkerService)TurbineServices
                .getInstance().getService(FreeMarkerService.SERVICE_NAME);
            context = fm.getContext();
            data.getTemplateInfo()
                .setTemplateContext(FreeMarkerService.CONTEXT, context);
        }
        return context;
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

    public ConcreteElement buildTemplate(RunData data)
        throws Exception
    {
        SimpleHash context = getContext(data);
        String templateName = data.getTemplateInfo().getNavigationTemplate();
        FreeMarkerService fm = (FreeMarkerService)
            TurbineServices.getInstance()
                .getService(FreeMarkerService.SERVICE_NAME);

        StringElement output = new StringElement();
        output.setFilterState(false);
        output.addElement(
            fm.handleRequest(context, "navigations/" + templateName, true));
        return output;
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

     * @param RunData data
     * @return SimpleHash
     */
    protected SimpleHash getContext(RunData data)
    {
      FreeMarkerService fm = (FreeMarkerService)
          TurbineServices.getInstance()
              .getService(FreeMarkerService.SERVICE_NAME);
      return fm.getContext(data);
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

     *
     * @return SimpleHash
     */
    protected SimpleHash getContext()
    {
      FreeMarkerService fm = (FreeMarkerService)
          TurbineServices.getInstance()
              .getService(FreeMarkerService.SERVICE_NAME);
      return fm.getContext();
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

    protected StringElement doBuildTemplate(SimpleHash context,
                                            String templateFile,
                                            boolean cache)
        throws Exception
    {
        FreeMarkerService fm = (FreeMarkerService)
            TurbineServices.getInstance()
                .getService(FreeMarkerService.SERVICE_NAME);
        StringElement output = new StringElement();
        output.setFilterState(false);
        output.addElement(fm.handleRequest(context,templateFile, cache));
        return output;
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

        // TemplateInfo.
        SimpleHash context = (SimpleHash)data.getTemplateInfo()
            .getTemplateContext(FreeMarkerService.CONTEXT);
        if (context == null)
        {
            FreeMarkerService fm = (FreeMarkerService)TurbineServices
                .getInstance().getService(FreeMarkerService.SERVICE_NAME);
            context = fm.getContext();
            data.getTemplateInfo()
                .setTemplateContext(FreeMarkerService.CONTEXT, context);
        }
        return context;
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

            (templateName.charAt(0) != '/'))
        {
            templateName = '/' + templateName;
        }

        FreeMarkerService fm = (FreeMarkerService)
            TurbineServices.getInstance()
            .getService(FreeMarkerService.SERVICE_NAME);

        StringElement output = new StringElement();
        output.setFilterState(false);
        output.addElement(
            fm.handleRequest(context, "screens" + templateName, true));
        return output;
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

        // TemplateInfo.
        SimpleHash context = (SimpleHash)data.getTemplateInfo()
            .getTemplateContext(FreeMarkerService.CONTEXT);
        if (context == null)
        {
            FreeMarkerService fm = (FreeMarkerService)TurbineServices
                .getInstance().getService(FreeMarkerService.SERVICE_NAME);
            context = fm.getContext();
            data.getTemplateInfo()
                .setTemplateContext(FreeMarkerService.CONTEXT, context);
        }
        return context;
    }
View Full Code Here

Examples of org.apache.turbine.services.freemarker.FreeMarkerService

            (templateName.charAt(0) != '/'))
        {
            templateName = '/' + templateName;
        }

        FreeMarkerService fm = (FreeMarkerService)
            TurbineServices.getInstance()
            .getService(FreeMarkerService.SERVICE_NAME);

        StringElement output = new StringElement();
        output.setFilterState(false);
        output.addElement(
            fm.handleRequest(context, "screens" + templateName, true));
        return output;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.