Reputation: 5851
Is it possible to have a custom, map-like class (although not related to map) in a Groovy template, in a way that I can specify how properties from my custom class are mapped to model properties? E.g. if we have property $firstName
I would like to customize how firstName
is obtained from my custom class.
Upvotes: 0
Views: 133
Reputation: 1530
If you use the MarkupTemplateEngine
, yes, it is possible. See http://groovy-lang.org/templating.html#markuptemplate-basetemplate
Upvotes: 1