如何从apache velocity文件中的列表中获取值?

时间:2015-04-29 12:54:01

标签: java arraylist velocity

如何从vm文件中的UIRowFormatList获取值?
我正在使用以下代码。

#set($i = $velocityCount-1)    
#set($rowFormatComponents = $UIRowFormatList.get($i))

我在运行时收到此异常:

"fo:table-body" is missing child elements. Required content model: marker* (table-row+|table-cell+)

当我在这样的get方法中将i的值硬编码为0时,它显示正确的值:

#set($rowFormatComponents = $UIRowFormatList.get(0)

0 个答案:

没有答案