org.infolayer.templates.elements
Class TE_call

java.lang.Object
  extended byorg.kxml2.kdom.Element
      extended byorg.infolayer.templates.TemplateElement
          extended byorg.infolayer.templates.ParameterizedElement
              extended byorg.infolayer.templates.elements.TE_call
All Implemented Interfaces:
Parameterized

public class TE_call
extends ParameterizedElement

The <t:call> element is replaced by the content of the template denoted by template or file attribute. The expr attribute denotes the context of the applied template, if present. Otherwise, the current context becomes the template context.

The file and template attributes are mutally exclusive. The file attribute denotes the path to the called template file, relative to the current directory, or if an absolute paht, relative to the base diectory for static tenplates.

The template parameter is resolved to a template file by a dynamic lookup operation. A template file with the given name and the extension ".inc" is searched in the dynamic template directory denoted by the type of the template context. Except from the different file extension, the lookup mechanism is identical to the lookup mechanism for top-level templates (used for URLs starting with "/auto").

If the called template contains an <t:inner /> element, template processing continutes with the child elements of the <t:call> element. For the child elements, the original evaluation context is preserved, it is not influenced by processing the called template.

<t:withParam> elements can be used to transfer parameters to the called template.

Attributes

file
Name of the template file to be called.
expr
The evaluation result of the expression is used as context for the called template.
template
Name of the template to be called.

Restrictions for Child Elements

If <t:withParam> child elements are present, they must precede any other content.

See Also:
Serialized Form

Constructor Summary
TE_call()
           
 
Method Summary
 void apply(XmlSerializer xw, IlRequest context, Bindings bindings)
          Applies the template mechanism.
 void init()
           
 
Methods inherited from class org.infolayer.templates.ParameterizedElement
addParam, setParams
 
Methods inherited from class org.infolayer.templates.TemplateElement
applyChildren, assertNoChildren, assertNoChildren, getAttributeValue, getVarDefs, readTextContent, setVarDefs, writeAttributes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TE_call

public TE_call()
Method Detail

init

public void init()
Overrides:
init in class TemplateElement

apply

public void apply(XmlSerializer xw,
                  IlRequest context,
                  Bindings bindings)
           throws java.io.IOException
Description copied from class: TemplateElement
Applies the template mechanism. Must be overwritten in the

Overrides:
apply in class TemplateElement
Throws:
java.io.IOException