#foreach($!obj in $!tables)
<tr>
#if( "$!obj.name" == "ga_dtbz" )
#set($obj.description = $descriptionList[0])
#elseif( "$!obj.name" == "ga_heaj" )
#set($obj.description = $descriptionList[1])
#elseif( "$!obj.name" == "ga_hexs" )
#set($obj.description = $descriptionList[2])
#elseif( "$!obj.name" == "ga_xsaj" )
#set($obj.description = $descriptionList[3])
#elseif( "$!obj.name" == "ga_zlaj" )
#set($obj.description = $descriptionList[4])
#end
<td>$!obj.name</td>
<td>$!obj.schema</td>
velocity模板引擎foreach、if else以及赋值语句
最新推荐文章于 2024-03-17 00:08:12 发布
本文介绍了Velocity模板引擎中的foreach循环、if/else条件判断以及赋值语句的用法。通过示例展示了如何遍历tables对象,并根据对象的name属性设置description属性,利用(descriptionList)列表进行动态赋值。

最低0.47元/天 解锁文章
1101

被折叠的 条评论
为什么被折叠?



