Class MapLineMethod
java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.methods.MapLineMethod
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel
,freemarker.template.TemplateMethodModelEx
,freemarker.template.TemplateModel
Splits a string by the new line chracter, filters empty lines and maps the remaining lines to a simple template.
This is not a real freemarker template. The only thing that is parsed / replaced is $(line)
Example usage:
```
-
${mapLine(singleBase.relEvent.contents, '
- $(line) ')}
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MapLineMethod
public MapLineMethod()
-
-
Method Details
-
exec
- Specified by:
exec
in interfacefreemarker.template.TemplateMethodModel
- Specified by:
exec
in interfacefreemarker.template.TemplateMethodModelEx
- Throws:
freemarker.template.TemplateModelException
-