Package com.google.clearsilver.jsilver.template

Examples of com.google.clearsilver.jsilver.template.HtmlWhiteSpaceStripper


      // For Clearsilver compatibility we check this HDF variable to see if we
      // need to turn on whitespace stripping. The preferred approach would be
      // to turn it on in the JSilverOptions passed to JSilverFactory
      int wsStripLevel = localHdf.getIntValue("ClearSilver.WhiteSpaceStrip", 0);
      if (wsStripLevel > 0) {
        output = new HtmlWhiteSpaceStripper(output, wsStripLevel);
      }
      jSilver.render(template, data, output, resourceLoaderAdaptor);
      return output.toString();
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
View Full Code Here


  @Override
  public void render(Template template, Data data, Appendable output, ResourceLoader resourceLoader)
      throws IOException, JSilverException {
    if (options.getStripHtmlWhiteSpace() && !(output instanceof HtmlWhiteSpaceStripper)) {
      // Strip out whitespace from rendered HTML content.
      output = new HtmlWhiteSpaceStripper(output);
    }
    template.render(data, output, resourceLoader);
  }
View Full Code Here

TOP

Related Classes of com.google.clearsilver.jsilver.template.HtmlWhiteSpaceStripper

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.