Letractively / jcatapult

Automatically exported from code.google.com/p/jcatapult
0 stars 0 forks source link

JCatapult MVC FreeMarker integration doesn't fully support fields #91

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The FreeMarker support currently uses the DefaultObjectWrapper in
FreeMarker, which only supports JavaBean properties. If you access a field
of an action that is a list and then iterate over the list, you can't
access fields in the objects in the list. Like this:

  [#list results as result]
    ${result.name}
  [/#list]

If the Result class looks like this:

  public class Result {
    public String name;
  }

This needs to be updated to fully support fields by writing a custom
ObjectWrapper.

Original issue reported on code.google.com by bpontare...@gmail.com on 8 Oct 2008 at 3:05

GoogleCodeExporter commented 8 years ago
Fixed this by calling setExposeFields on the ObjectWrapper and ensuring that 
the ObjectWrappers are all setup 
correctly.

Original comment by bpontare...@gmail.com on 8 Apr 2009 at 12:45