Currently, FreeMarker doesn't handle nested expressions very well. For example:

<#assign var1 = "this is var1"/>
<#assign var2 = "var1"/>
${${var2}}

should produce "this is var1" - but it throws an exception instead.

There is also a problem with handling expressions contained in a Map - as has 
been discussed recently regarding UI labels.

I spent most of the day today looking through the FreeMarker website and 
through their source code. I don't see an easy way to fix the problem.

Here are some options:

1. Leave a message for the FreeMarker folks and ask for better nested 
expression support.
2. Modify their source code to fix the problem, and keep our own version of the 
library (yuck).
3. Have FreeMarker render to a String, do our own expression expansions on the 
String, then output the result.

If anyone has any other options, please let me know.

Your thoughts and comments are welcome.

-Adrian



      

Reply via email to