Package org.apache.turbine.services.freemarker

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


        // 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

    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

     * @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

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

    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

        // 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

            (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

        // 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

            (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

Related Classes of org.apache.turbine.services.freemarker.FreeMarkerService

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.