Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once you get familiar with FreeMarker, you will find certain subtleties with it that may become frustrating. The most common thing you'll likely run in to is the BeansWrapper provided by FreeMarker. If you don't know what this is, don't worry. However, if you do, know this: the default FreeMarkerManager provided by WebWork uses a default BeansWrapper instance with one change: setSimpleMapWrapper() is set to false. This means that when referencing maps, you must use map.size() rather than map?size. Also, you may have to get map values by calling map.get(foo) rather than mapfoo, especially if foo is not a String.

Wiki Markup
{snippet:id=javadoc|javadoc=true|url=com.opensymphony.webwork.views.freemarker.WebWorkBeanWrapper}

Syntax Notes

As of FreeMarker 2.3.4, an alternative syntax is supported. This alternative syntax is great if you find that your IDE (especially IntelliJ IDEA) makes it difficult to work with the default syntax. You can read more about this syntax here.