程序包 org.beetl.core

类 TemplateProxy

java.lang.Object
org.beetl.core.Template
org.beetl.core.TemplateProxy

public class TemplateProxy extends Template
提供一个可重用的模板引擎
 Template template = gt.getTemplate();
 Template templateProxy =  gt.getTemplateProxy(template);

 
  • 构造器详细资料

    • TemplateProxy

      public TemplateProxy(Template template)
  • 方法详细资料

    • renderTo

      public void renderTo(ByteWriter byteWriter)
      覆盖:
      renderTo 在类中 Template
    • binding

      public void binding(String varName, Object o)
      从类复制的说明: Template
      为模板绑定一个变量,infer是true
      覆盖:
      binding 在类中 Template
      参数:
      varName - 变量名称,必须符合jaavascript 命名规范
      o - 模板变量
    • fastBinding

      public void fastBinding(Map map)
      覆盖:
      fastBinding 在类中 Template
    • getCtx

      public Context getCtx()
      覆盖:
      getCtx 在类中 Template
    • validate

      public BeetlException validate()
      语法校验,如果返回BeetlException,则表示语法有错,返回null,语法无错误
      覆盖:
      validate 在类中 Template
    • current

      protected Template current()
    • clear

      protected void clear()