Jetspeed

Essentials

Download

Documentation

Components

Get Involved

Velocity

Class Name : org.apache.jetspeed.portal.portlets.VelocityPortlet


Description

Present content rendered via a Velocity template in a portlet.

Additional information about Velocity is available at http://jakarta.apache.org/velocity


Element: parameter

Only the template parameter is required. If the "action" parameter is defined, the referenced class may require additional parameters.

Parameters common to many portlets.

Parameter Name Description
action Name of action class, relative to org.apache.jetspeed.modules.actions. The class file is expected in <jetspeed_home>WEB-INF/classes/org/apache/jetspeed/modules/actions.
This parameter is optional.
template Name of VM file. The file is expected in <jetspeed_home>WEB-INF/templates/vm/media_type.


Example of Registry Entry
<portlet-entry name="PortletCustomizer"
               hidden="true"
               type="instance" application="false">
  <security role="user"/>
  <meta-info>
    <title>Customize portlet</title>
  </meta-info>
  <classname>org.apache.jetspeed.portal.portlets.VelocityPortlet</classname>
  <parameter name="template" value="customizer-portlet" hidden="false"/>
  <parameter name="action" value="portlets.CustomizeAction" hidden="false"/>
</portlet-entry>


Context or Variables available to a Velocity Template

Below is a list variables that can be used in the Velocity template file. Their values are defined by Jetspeed. For a list of properties and methods available, refer to the Classname documentation.

Context Classname Description
action String Class name to process form
clink JetspeeedContentLink  
conf PortletConfig  
config JetspeeedResources  
data RunData  
jetspeed JetspeedTool  
jlink JetspeedTemplateLink  
portlet VelocityPortlet  
skin PortletSkin  
template String Name of Velocity template



Copyright © 1999-2002, Apache Software Foundation