velocity 如何显示ArrayList
这样的ArrayList:
public ArrayList list()
{int i=0;
ArrayList li = new ArrayList();
while(i <10)
{
book.setBookName( "aaaaaaaa ");
book.setBookClass( "bbbbbbb ");
li.add(book);
i++;
}
return li;
}
------解决方案--------------------#foreach($book in $li)
$book.bookName
$book.bookClass
#end