at.newmedialab.ldpath.template.engine
Class NamespaceDirective
java.lang.Object
at.newmedialab.ldpath.template.engine.NamespaceDirective
- All Implemented Interfaces:
- freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel
public class NamespaceDirective
- extends Object
- implements freemarker.template.TemplateDirectiveModel
Add file description here!
Author: Sebastian Schaffert
| Fields inherited from interface freemarker.template.TemplateModel |
NOTHING |
|
Method Summary |
void |
execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
Executes this user-defined directive; called by FreeMarker when the user-defined
directive is called in the template. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamespaceDirective
public NamespaceDirective()
execute
public void execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
throws freemarker.template.TemplateException,
IOException
- Executes this user-defined directive; called by FreeMarker when the user-defined
directive is called in the template.
- Specified by:
execute in interface freemarker.template.TemplateDirectiveModel
- Parameters:
env - the current processing environment. Note that you can access
the output Writer by Environment.getOut().params - the parameters (if any) passed to the directive as a
map of key/value pairs where the keys are String-s and the
values are TemplateModel instances. This is never
null. If you need to convert the template models to POJOs,
you can use the utility methods in the freemarker.template.utility.DeepUnwrap class.loopVars - an array that corresponds to the "loop variables", in
the order as they appear in the directive call. ("Loop variables" are out-parameters
that are available to the nested body of the directive; see in the Manual.)
You set the loop variables by writing this array. The length of the array gives the
number of loop-variables that the caller has specified.
Never null, but can be a zero-length array.body - an object that can be used to render the nested content (body) of
the directive call. If the directive call has no nested content (i.e., it is like
[@myDirective /] or [@myDirective][/@myDirective]), then this will be
null.
- Throws:
freemarker.template.TemplateException
IOException
Copyright © 2012 Salzburg Research. All Rights Reserved.