All Packages Class Hierarchy This Package Previous Next Index

Class org.jfouffa.jslider.template.DefaultTemplate

java.lang.Object
   |
   +----org.jfouffa.jslider.template.DefaultTemplate

public class DefaultTemplate
extends Object
implements TemplateHandler
The template handler for dynamic macro. A dynamic macro is a macro that can be deduce from the template. For example, the macro currentPage is not defined in the template, so the template loader invoke the function getDynamicMacro to find the value.


Constructor index

 o DefaultTemplate()

Method index

 o getDynamicMacro(String)
The handler function.

Constructors

 o DefaultTemplate
 public DefaultTemplate()

Methods

 o getDynamicMacro
 public String getDynamicMacro(String name)
The handler function. By default, it returns the complete macro ("&<the-name>;").
 public String getDynamicMacro(String name) {
    if (name.equals(MY_MACRO)) {
        return MY_REPLACED_TEXT;
    }
    // don't forget to invoke the super ...
    return super(name);
 }