org.apache.jetspeed.modules.parameters
Class VelocityParameterPresentationStyle
java.lang.Object
org.apache.turbine.modules.Assembler
org.apache.jetspeed.modules.parameters.ParameterPresentationStyle
org.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:
- data - rundata object
- name - name of the parameter
- value - current value of the parameter
- parms - map of additional style parameters
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VelocityParameterPresentationStyle
public VelocityParameterPresentationStyle()
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 objectname
- - parameter namevalue
- - current parameter valueparms
- - 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.