Class LoadEntitiesDirective
java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.directives.LoadEntitiesDirective
- All Implemented Interfaces:
Nice2TemplateDirective,TemplateIdentifiers,freemarker.template.TemplateDirectiveModel,freemarker.template.TemplateModel
public class LoadEntitiesDirective
extends Object
implements Nice2TemplateDirective, TemplateIdentifiers
Directive for
FreemarkerEngine to load a collection
of entities from within a template. Parameters available in template:
entity(optional): the reference entity, if not specified the entity stored in baseData is loadedpath(optional): a path to a collection of entities to follow from the entity, if not specified the collection stored inentityis loaded into the variablename(required): name for the variable to access the collection from within the [@loadEntities] block in the templateorderBy(optional): specify an ordering for the entities to load. field refereces have to be relative to the entity to be load, not to the entity specified in the entity param
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.templating.api.freemarker.directives.TemplateIdentifiers
TemplateIdentifiers.Scope -
Field Summary
FieldsFields inherited from interface ch.tocco.nice2.templating.api.freemarker.directives.TemplateIdentifiers
BASEDATA_VAR, DELIMITER_PARAM, ENTITY_PARAM, INLINE_TEMPLATE, KEY, LIMIT_PARAM, LINE_END_PARAM, LINE_START_PARAM, NAME_PARAM, PATH_PARAM, PATHS_PARAM, PATTERN_PARAM, RECIPIENT_VAR, SCOPE_PARAM, SENDER_VAR, SINGLE_BASE_VAR, TARGET_VAR, VALUE_PARAMFields inherited from interface freemarker.template.TemplateModel
NOTHING -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DIRECTIVE_IDENTIFIER
- See Also:
-
-
Constructor Details
-
LoadEntitiesDirective
public LoadEntitiesDirective()
-
-
Method Details
-
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:
executein interfacefreemarker.template.TemplateDirectiveModel- Throws:
freemarker.template.TemplateExceptionIOException
-