|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TemplateFunctionModel
Functions in a template data model must implement this interface.
Performs a function on the given data model, and writes output
to the given writer. Any errors are handled using the given
TemplateRuntimeHandler
. The supplied argument values list may be
used as parameters to the function call.
For experts only
This model is similar in principle to the TemplateTransformModel
and TemplateTransformModel2
interfaces. The key
differences in using this model are:
TemplateMethodModel2
This makes this model very powerful, in many ways similar to an
EmptyInstruction
element. In particular, having access to the global
data model gives you more than enough rope to hang yourself with.
For this reason, only use this model if your only other
option would be to create a new FM-Classic tag. Normally either a
TemplateTransformModel
and/or a TemplateMethodModel2
model would be sufficient.
Note: this model is likely to change in future releases of FM-Classic.
Method Summary | |
---|---|
void |
callFunction(TemplateWriteableHashModel modelRoot,
java.io.Writer out,
TemplateRuntimeHandler eventHandler,
java.util.List<TemplateModel> argValues)
Performs a function on the given data model. |
Methods inherited from interface freemarker.template.TemplateModel |
---|
isEmpty |
Method Detail |
---|
void callFunction(TemplateWriteableHashModel modelRoot, java.io.Writer out, TemplateRuntimeHandler eventHandler, java.util.List<TemplateModel> argValues) throws java.io.IOException, TemplateModelException
modelRoot
- the template model root, provides full access to the data modelout
- the Writer to which output should be senteventHandler
- handles any events such as template exceptionsargValues
- a List
of TemplateModel
s
representing the arguments to the function
java.io.IOException
TemplateModelException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |