ee.mare.indrek.jtlt.macros
Class HtmlKeyMacro

Object
  extended byee.mare.indrek.jtlt.macros.KeyMacro
      extended byee.mare.indrek.jtlt.macros.HtmlKeyMacro
All Implemented Interfaces:
TemplateMacro

public class HtmlKeyMacro
extends KeyMacro

A macro (KEY) that does HTML escaping on input. The escaping is not done when HtmlTemplate.replaceraw is used.


Nested Class Summary
 
Nested classes inherited from class ee.mare.indrek.jtlt.macros.KeyMacro
KeyMacro.KeyValue
 
Constructor Summary
HtmlKeyMacro()
           
HtmlKeyMacro(String name)
           
 
Method Summary
 String process(TemplateParams ctx, String name, String args)
          This method is called with given block context whenever a macro with registered name is found inside the tempalate.
 
Methods inherited from class ee.mare.indrek.jtlt.macros.KeyMacro
getName, isParsetime, isRecursive
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlKeyMacro

public HtmlKeyMacro()

HtmlKeyMacro

public HtmlKeyMacro(String name)
Method Detail

process

public String process(TemplateParams ctx,
                      String name,
                      String args)
Description copied from interface: TemplateMacro
This method is called with given block context whenever a macro with registered name is found inside the tempalate. The macros are resolved immediately only if they are parsetime, otherwise on every Template.toString the data structures are parsed and macros expanded. If macro is parsetime the ctx is taken from the generator. You can add parameters into the template using the Template.addParam, for parsetime macros you'd have to extend the TemplateGenerator.

Specified by:
process in interface TemplateMacro
Overrides:
process in class KeyMacro