How to pass a Java Map as a Tiles template attribute?

167 Views Asked by At

Is there a way to pass a java Map inside a tiles template definition?

Something like this:

<definition name="my.template.name" extends="another.template">
   <put-attribute name="breadcrumbs" value="{'home':'home.action'}"/>
</definition>

The only workaround I found is to pass the map as a JSON String (as in the previous example), create a JSON object from it and then converting it to a Java Map.

0

There are 0 best solutions below