Package com.google.sitebricks.compiler

Examples of com.google.sitebricks.compiler.TemplateCompiler


  public Renderable compile(PageBook.Page page) {

      Show methodShow = page.getShow();

      Template template = load(page.pageClass(), methodShow);
      TemplateCompiler templateCompiler = templateSystem.compilerFor(template.getName());

      if (templateCompiler == null) {
        templateCompiler = templateSystem.compilerFor("html");
      }

      return templateCompiler.compile(page.pageClass(), template);
    }
View Full Code Here


      return templateCompiler.compile(page.pageClass(), template);
    }

  public Renderable compile(Class<?> templateClass) {
      Template template = load(templateClass, null);
      TemplateCompiler templateCompiler = templateSystem.compilerFor(template.getName());
      //
      // This is how the old mechanism worked, for example if dynamic.js comes through the system we still pass back
      // the html compiler. JVZ: not sure why this wouldn't be directly routed to the right resource. TODO: investigate
      //
      if (templateCompiler == null) {
        templateCompiler = templateSystem.compilerFor("html");
      }

      return templateCompiler.compile(templateClass, template);
    }
View Full Code Here

TOP

Related Classes of com.google.sitebricks.compiler.TemplateCompiler

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.