Assuming a list pass to the Velocity context.
To get the list value,
below is the syntax in Velocity template
Done!!
List list = new ArrayList();
list.add("item1");
list.add("item2");
list.add("item3");
VelocityContext context = new VelocityContext();
context.put("list", list);
To get the list value,
below is the syntax in Velocity template
$list.get(0)
$list.get(1)
$list.get(2)
Done!!
No comments:
Post a Comment