36 articles and counting
      

Working With Lists in Apache Velocity

Velocity engine: 1.5
Velocity tools: 1.3

Im working with some legacy Velocity templates at the moment and pulling my hair out. I prefer FreeMarker over Velocity but I have no choice on this one. I love Apache in the sense that they develop lots of good projects and give it to you for free. What lets alot of the projects down I feel is the lack of decent documentation and examples. But hey, you cant have everything for free!

Take the List Tool for example. Ive wasted about 4 hours today trawling through the Velocity documentation and forum posts trying to find out why I can get this to work:

$list.set($someList, $someInteger, $someObject)

It returns null every time!

Then I just tried this out of despair:

$someList.add($someObject)

Guess what this works. Nothing in the documentation! At least nothing I could find!