org.apache.jetspeed.modules.parameters
Class VelocityParameterPresentationStyle

java.lang.Object
  extended byorg.apache.turbine.modules.Assembler
      extended byorg.apache.jetspeed.modules.parameters.ParameterPresentationStyle
          extended byorg.apache.jetspeed.modules.parameters.VelocityParameterPresentationStyle
Direct Known Subclasses:
CheckBox, CheckBoxGroup, ListBox, MyPagesListBox, PopupCalendar, RegistryEntryListBox

public class VelocityParameterPresentationStyle
extends ParameterPresentationStyle

Generic Velocity-based presentation style. The following default objects are put in the context:

Supporting Velocity templates should be placed in ${velocity-templates-root}/parameters folder.

It may be used directly with "template" as the only required parameter. This is useful when the no additional objects are needed by the template.

If additional objects need to be put in the context, a new class extending VelocityParameterPresentationStyle should be created. Override buildContext to place custom objects in the Velocity context.

If "template" parameter is not specified, it is assumed that the template name is "classname.vm".

Version:
$Id: VelocityParameterPresentationStyle.java,v 1.7 2005/01/18 17:08:45 morciuch Exp $
Author:
Mark Orciuch

Field Summary
 
Fields inherited from class org.apache.jetspeed.modules.parameters.ParameterPresentationStyle
logger, styleparms
 
Constructor Summary
VelocityParameterPresentationStyle()
           
 
Method Summary
 void buildContext(org.apache.turbine.util.RunData data, java.lang.String name, java.lang.String value, java.util.Map parms, org.apache.velocity.context.Context context)
          Override this method to put your own objects in the Velocity context
 java.lang.String getContent(org.apache.turbine.util.RunData data, java.lang.String name, java.lang.String value, java.util.Map parms)
          Returns presentation control
 
Methods inherited from class org.apache.jetspeed.modules.parameters.ParameterPresentationStyle
getJavascriptEvents, getParm, setParms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityParameterPresentationStyle

public VelocityParameterPresentationStyle()
Method Detail

getContent

public java.lang.String getContent(org.apache.turbine.util.RunData data,
                                   java.lang.String name,
                                   java.lang.String value,
                                   java.util.Map parms)
Returns presentation control

Specified by:
getContent in class ParameterPresentationStyle
Parameters:
data - - rundata object
name - - parameter name
value - - current parameter value
parms - - additional style parameters
Returns:
string

buildContext

public void buildContext(org.apache.turbine.util.RunData data,
                         java.lang.String name,
                         java.lang.String value,
                         java.util.Map parms,
                         org.apache.velocity.context.Context context)
Override this method to put your own objects in the Velocity context

Parameters:
data -
name -
value -
parms -
context -


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