类 GeneralVarTagBinding
java.lang.Object
org.beetl.core.tag.Tag
org.beetl.core.tag.GeneralVarTagBinding
此类子类将可以作为html 标签使用,除了能实现bindVars来初始化绑定的变量外,允许render方法里通过调用
方法bind(name,value) 来绑定变量,或者更常用的是binds(Object... array)如下是一个例子
public class TestGeneralVarTagBinding extends GeneralVarTagBinding
{
public void render()
{
for (int i = 0; i < 5; i++)
{
this.bind("value", i);// or this.binds(i);
this.doBodyRender();
}
}
}
此例子会循环渲染标签体5次,并且每次循环都会设置value的值,如下是模板内容
<#tag ; value>
${value}
</#tag>
-
字段概要
-
构造器概要
构造器 -
方法概要
从类继承的方法 org.beetl.core.tag.Tag
afterRender, containHtmlAttribute, doBodyRender, getArgs, getBodyContent, getHtmlAttribute, getParent, inintBase, init, render, setTagParent
-
构造器详细资料
-
GeneralVarTagBinding
public GeneralVarTagBinding()
-
-
方法详细资料
-
mapName2Index
-
binds
按照标签变量声明的顺序绑定 -
getAttributeValue
-
getHtmlTagName
-
getAttributes
-