Class LoadValueDirective
java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.directives.LoadValueDirective
- All Implemented Interfaces:
Nice2TemplateDirective,TemplateIdentifiers,freemarker.template.TemplateDirectiveModel,freemarker.template.TemplateModel
@Deprecated
public class LoadValueDirective
extends Object
implements Nice2TemplateDirective, TemplateIdentifiers
Deprecated.
use freemarker syntax directly (e.g. `${entity.firstname}` instead of `[@loadValue entity=entity path="firstname"]`)
Directive for
FreemarkerEngine to load a value from
an entity within a template. Parameters available in template:
entity(optional): the reference entity, if not specified the entity stored in baseData is loadedpath(required): a path to a field to follow from the entityname(optional): a variable name to store the value (value is not written to output in this case)pattern(optional): a pattern (as inDateTimeFormatter) to format a date (ignored when accessed field is not a datedelimiter(optional): a delimiter to split the valuelineStart(optional): a string which will be placed at the start of a new line (in combination withdelimiter)lineEnd(optional): a string which will be placed at the end of a new line (in combination withdelimiter)
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.templating.api.freemarker.directives.TemplateIdentifiers
TemplateIdentifiers.Scope -
Field Summary
Fields 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
-
Constructor Details
-
LoadValueDirective
public LoadValueDirective(org.slf4j.Logger log) Deprecated.
-
-
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 Deprecated.- Specified by:
executein interfacefreemarker.template.TemplateDirectiveModel- Throws:
freemarker.template.TemplateExceptionIOException
-