Class ModelIncludeDirective

  • All Implemented Interfaces:
    freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

    public class ModelIncludeDirective
    extends Object
    implements freemarker.template.TemplateDirectiveModel
    A TemplateDirectiveModel which allows to recursively write a graph of Writables, with each element using its own template. Elements are imported into the parent template by using this directive like so: <@includeModel object=myProperty/>.
    Author:
    Gunnar Morling
    • Constructor Detail

      • ModelIncludeDirective

        public ModelIncludeDirective​(freemarker.template.Configuration configuration)
    • Method Detail

      • execute

        public void execute​(freemarker.core.Environment env,
                            Map params,
                            freemarker.template.TemplateModel[] loopVars,
                            freemarker.template.TemplateDirectiveBody body)
                     throws freemarker.template.TemplateException,
                            IOException
        Specified by:
        execute in interface freemarker.template.TemplateDirectiveModel
        Throws:
        freemarker.template.TemplateException
        IOException