org.apache.turbine.modules.screens
Class BaseFreeMarkerScreen

java.lang.Object
  |
  +--org.apache.turbine.modules.Assembler
        |
        +--org.apache.turbine.modules.Screen
              |
              +--org.apache.turbine.modules.screens.TemplateScreen
                    |
                    +--org.apache.turbine.modules.screens.BaseFreeMarkerScreen

Deprecated. you should use velocity

public class BaseFreeMarkerScreen
extends TemplateScreen

Sample FreeMarker Screen. Screens which use FreeMarker templates can extend this screen. For templates which require no database content, this screen may be adequate. In other cases, screens can override the doBuildFreeMarker method to add more data to the context.

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

Fields inherited from class org.apache.turbine.modules.Screen
filter, minFilter
 
Constructor Summary
BaseFreeMarkerScreen()
          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 TemplateScreen like us.
protected  void doBuildTemplate(RunData data, freemarker.template.SimpleHash context)
          Deprecated. Screens extending this class should overide this method to perform any particular business logic and add information to the context.
protected  freemarker.template.SimpleHash getContext(RunData data)
          Deprecated. Return the model needed by FreeMarker.
 
Methods inherited from class org.apache.turbine.modules.screens.TemplateScreen
doBuild, doPostBuildTemplate, doRedirect, doRedirect, setTemplate
 
Methods inherited from class org.apache.turbine.modules.Screen
build, getLayout, htmlFilter, htmlMinFilter, prepareText, prepareTextMinimum, setLayout
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

BaseFreeMarkerScreen

public BaseFreeMarkerScreen()
Deprecated. 
Method Detail

doBuildTemplate

protected void doBuildTemplate(RunData data,
                               freemarker.template.SimpleHash context)
                        throws java.lang.Exception
Deprecated. 
Screens extending this class should overide this method to perform any particular business logic and add information to the context.
Parameters:
data, - the Rundata object
context, - the context into which the extra data is to be added.
Throws:
Exception, - a generic exception.

doBuildTemplate

protected void doBuildTemplate(RunData data)
                        throws java.lang.Exception
Deprecated. 
Needs to be implemented to make TemplateScreen like us. The actual method that you should override is the one with the context in the parameter list.
Overrides:
doBuildTemplate in class TemplateScreen
Parameters:
data, - the Rundata object
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, - the Rundata object
Returns:
SimpleHash

buildTemplate

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


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