Package de.neuland.jade4j.template

Examples of de.neuland.jade4j.template.JadeTemplate


      }

      templateData.put("modules", modules);

      // * Load the template
      JadeTemplate tpl = getTemplate("workflow");

      root.mkdirs();

      // * Process the template
      try
View Full Code Here


        }

      templateData.put("inputs", inputs);

      // * Load the template
      JadeTemplate tpl = getTemplate("module");

      moduleDir.mkdirs();

      // * Process the template
      try
View Full Code Here

        }

      templateData.put("outputs", outputs);

      // * Load the template
      JadeTemplate tpl = getTemplate("instance");

      instanceDir.mkdirs();

      // * Process the template
      try
View Full Code Here

     
      templateData.put("name", name);
      templateData.put("url", "images/"+filename);
     
      // * Load the template
      JadeTemplate tpl;
      try
      {
        tpl = writer.getTemplate("parser.image.jade");
      } catch (IOException e)
      {
View Full Code Here

    }

    @Override
    public void render(final String filename, final Map<String, Object> context, final Handler<AsyncResult<Buffer>> next) {
        try {
            JadeTemplate template = getTemplateFromCache(resolve(filename));

            if (template == null) {
                // real compile
                template = config.getTemplate(filename);
                putTemplateToCache(resolve(filename), template);
View Full Code Here

  private JadeTemplate getJadeTemplate(String name) throws IOException {
    Parser parser = new Parser("templates/" + name, JadeHelper.JADE_LOADER);
    Node root = parser.parse();

    final JadeTemplate jadeTemplate = new JadeTemplate();

    jadeTemplate.setTemplateLoader(JadeHelper.JADE_LOADER);
    jadeTemplate.setRootNode(root);

    return jadeTemplate;
  }
View Full Code Here

  }

  @Override
  public void render(String templateName, Map<String, Object> root, Writer writer) throws TemplateException {
    try {
      JadeTemplate template = jadeConfig.getTemplate(templateName);
      jadeConfig.renderTemplate(template, root, writer);
    } catch(Exception e) {
      throw new TemplateException(e);
    }
  }
View Full Code Here

  @Override
  public int doStartTag() throws JspException {
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());

    JadeConfiguration jadeConfiguration = context.getBean(JadeConfiguration.class);
    JadeTemplate jadeTemplate = context.getBean("TemplateComment", JadeTemplate.class);

    Map<String, Object> data = Maps.newHashMap();

    data.put("comment", comment);
    data.put("enableSchema", enableSchema);
View Full Code Here

  @Override
  public int doStartTag() throws JspException {
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());

    JadeConfiguration jadeConfiguration = context.getBean(JadeConfiguration.class);
    JadeTemplate jadeTemplate = context.getBean("TemplateSign", JadeTemplate.class);

    Map<String, Object> data = Maps.newHashMap();

    data.put("user", user);
    data.put("shortMode", shortMode);
View Full Code Here

TOP

Related Classes of de.neuland.jade4j.template.JadeTemplate

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.