| 程序包 | 说明 |
|---|---|
| org.beetl.core | |
| org.beetl.core.lab | |
| org.beetl.ext.tag |
| 限定符和类型 | 类和说明 |
|---|---|
class |
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>
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
TestTag |
| 限定符和类型 | 类和说明 |
|---|---|
class |
HTMLTagVarBindingWrapper
封装了带变量绑定的html标签调用的标签
|
Copyright © 2017. All rights reserved.