Package httl

Examples of httl.Template.render()


      if (StringUtils.isNotEmpty(extendsNested)) {
        oldNested = context.put(extendsNested, new ListenerTemplate(template, listener));
      }
      try {
        Template extend = fileMethod.$extends(extendsName, template.getLocale(), template.getEncoding());
        extend.render(context.getOut());
      } finally {
        if (StringUtils.isNotEmpty(extendsNested)) {
          if (oldNested != null) {
            context.put(extendsNested, oldNested);
          } else {
View Full Code Here


      } else if (data instanceof Model) {
        ((Model) data).setExtends("default.httl");
      }
    }
    try {
      template.render(data, actualWriter);
      template.render(data, actualStream);
    } catch (Throwable e) {
      System.out.println("\n================================\n" +  config + ": " + template.getName() + "\n================================\n");
      e.printStackTrace();
      throw new IllegalStateException(e.getMessage() + "\n================================\n" +  config + ": " + template.getName() + "\n================================\n", e);
View Full Code Here

        ((Model) data).setExtends("default.httl");
      }
    }
    try {
      template.render(data, actualWriter);
      template.render(data, actualStream);
    } catch (Throwable e) {
      System.out.println("\n================================\n" +  config + ": " + template.getName() + "\n================================\n");
      e.printStackTrace();
      throw new IllegalStateException(e.getMessage() + "\n================================\n" +  config + ": " + template.getName() + "\n================================\n", e);
    }
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.