Package cn.bran.japid.template

Examples of cn.bran.japid.template.RenderResult


   * @param s
   */
  protected static JapidResult renderText(String s) {
    Map<String, String> headers = new HashMap<String, String>();
    headers.put("Content-Type", "text/plain; charset=utf-8");
    return render(new RenderResult(headers, new StringBuilder(s), -1L));
  }
View Full Code Here


  public RenderResult run() {
    if (!shouldCache()) {
      return render();
    } else {
      // cache in work
      RenderResult rr = null;
      if (!readThru) {
        try {
          rr = RenderResultCache.get(getKeyString());
          if (rr != null)
            return rr;
View Full Code Here

        if (tClass == null) {
          String templateFileName = templateClassName.replace('.', '/') + ".html";
          throw new RuntimeException("Japid Emailer: could not find a Japid template with the name of: " + templateFileName);
        } else if (JapidTemplateBase.class.isAssignableFrom(tClass)) {
          JapidResult jr = JapidController.render(tClass, args);
        RenderResult rr = jr.getRenderResult();
        bodyHtml = rr.getContent().toString();
        } else {
          throw new RuntimeException("The found class is not a Japid template class: " + templateClassName);
        }

//        System.out.println("email body: " + bodyHtml);
View Full Code Here

TOP

Related Classes of cn.bran.japid.template.RenderResult

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.