org.apache.turbine.modules.navigations
Class BaseFreeMarkerNavigation

java.lang.Object
  |
  +--org.apache.turbine.modules.Assembler
        |
        +--org.apache.turbine.modules.Navigation
              |
              +--org.apache.turbine.modules.navigations.TemplateNavigation
                    |
                    +--org.apache.turbine.modules.navigations.BaseFreeMarkerNavigation

Deprecated. you should use velocity

public class BaseFreeMarkerNavigation
extends TemplateNavigation

Sample FreeMarker Navigation. Navigations which use FreeMarker templates can extend this screen and override the doBuild method. For templates which require no database content, this Navigation may be adequate. In other cases, Navigations can override the doBuildTemplate method to add more data to the context.

Version:
$Id: BaseFreeMarkerNavigation.java,v 1.1.1.1 2001/08/16 05:08:34 jvanzyl Exp $
Author:
John D. McNally

Fields inherited from class org.apache.turbine.modules.Navigation
filter
 
Constructor Summary
BaseFreeMarkerNavigation()
          Deprecated.  
 
Method Summary
 org.apache.ecs.ConcreteElement buildTemplate(RunData data)
          Deprecated. Build the template.
protected  void doBuildTemplate(RunData data)
          Deprecated. Needs to be implemented to make TemplateNavigation like us.
protected  void doBuildTemplate(RunData data, freemarker.template.SimpleHash context)
          Deprecated. Method to be overidden by subclasses to include data in the context.
protected  freemarker.template.SimpleHash getContext(RunData data)
          Deprecated. Return the model needed by FreeMarker.
 
Methods inherited from class org.apache.turbine.modules.navigations.TemplateNavigation
doBuild
 
Methods inherited from class org.apache.turbine.modules.Navigation
build, htmlFilter, prepareText
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

BaseFreeMarkerNavigation

public BaseFreeMarkerNavigation()
Deprecated. 
Method Detail

doBuildTemplate

protected void doBuildTemplate(RunData data,
                               freemarker.template.SimpleHash context)
                        throws java.lang.Exception
Deprecated. 
Method to be overidden by subclasses to include data in the context.
Parameters:
data, - the Rundata object
context, - the context where the extra data is added.
Throws:
Exception, - a generic exception.

doBuildTemplate

protected void doBuildTemplate(RunData data)
                        throws java.lang.Exception
Deprecated. 
Needs to be implemented to make TemplateNavigation like us. The actual method that you should override is the one with the context in the parameter list.
Overrides:
doBuildTemplate in class TemplateNavigation
Parameters:
data - Turbine information.
Throws:
Exception, - a generic exception.

getContext

protected freemarker.template.SimpleHash getContext(RunData data)
Deprecated. 
Return the model needed by FreeMarker. This is where information needed by the template should be placed.
Parameters:
data - Turbine information.
Returns:
SimpleHash

buildTemplate

public org.apache.ecs.ConcreteElement buildTemplate(RunData data)
                                             throws java.lang.Exception
Deprecated. 
Build the template.
Overrides:
buildTemplate in class TemplateNavigation
Parameters:
data - Turbine information.
Returns:
A ConcreteElement.
Throws:
Exception, - a generic exception.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.