This project has retired. For details please refer to its Attic page. Jetspeed - Portlet Configuration How To Essentials Overview Features License Installation FAQ Sample Sites Resources Todo Changes Download Binaries Source Code Supporting Projects Community Portlets Documentation Configuration Guide Javadocs Development Jetspeed Tutorial Jetspeed Plugin Portlet Catalog Components JSR-168 Portlets Registry Security View Processors Syndication WAP Customization Cache PSML Forwards Database Container Authentication Jetspeed Cluster (JMS) Translated Japanese (Web) Get Involved Contributors CVS Repository View CVS CVS Branches Coding Spec Bug Database Project Documentation About Jetspeed 1 Enterprise Portal Project Info Project Reports Development Process 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 NameDescriptionaction 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. ContextClassnameDescriptionactionStringClass name to process formconforg.apache.jetspeed.portal.PortletConfigconfigorg.apache.jetspeed.services.resources.JetspeedResourcesdataorg.apache.jetspeed.services.rundata.JetspeedRunDatajetspeedorg.apache.jetspeed.util.template.JetspeedTooljslinkorg.apache.jetspeed.util.template.BaseJetspeedLinkl10norg.apache.turbine.services.localization.LocalizationToolLanguage specific textportletorg.apache.jetspeed.portal.portlets.AbstractPortletUse portlet_instance whenever possiableportlet_instanceorg.apache.jetspeed.portal.PortletInstanceskinorg.apache.jetspeed.portal.PortletSkintemplateStringName of Velocity template jslinkVariable NameDescriptionGeneral URL$jslinkLink to current page.$jslink.HomePageLink this Jetspeed installation's Home Page.Templates in the URL$jslink.getTemplateLink to the current page using the current template.$jslink.getTemplate( Template Name )Link to the current page using a named template.Path and Query item on URL$jslink.addPathInfo( Path Item, Item Value )Link to the current page with an additional path item.$jslink.addQueryInfo( Query Item, Item Value )Link to the current page with an additional query item.Actions items in the URL$jslink.ActionKeyThe name if the action query item.$jslink.getAction( Action Name )Link to current page with an action item.$jslink.getAction( Action Name, Portlet ID )Link to current page with an action item and a Portlet ID (PEID).Group/Role/User/Page element on URL$jslink.getGroup (Group Name )Link to the default page in a group.$jslink.getGroup( Group Name, Page Name )Link to the page in a group.$jslink.getRole (Role Name )Link to the default page in a Role.$jslink.getRole( Role Name, Page Name )Link to the page in a Role.$jslink.getUser (User Name )Link to the default page for the User.$jslink.getUser( User Name, Page Name )Link to a page for the User.$jslink.PageLink to the default page for the current user, group, or role.$jslink.getPage( Page Name )Link to page for the current user, group, or role.Pane items in the URL$jslink.getPaneById( Pane ID )Link to a pane, using it's PEID, in the current page.$jslink.getPaneByName( Pane Name ) Link to a pane, using it's name, in the current page. This should be used with caution since the name may not be unique. $jslink.getPortletById( Portlet ID )Link to a portlet, using it's PEID, in the current page.Portlet items in the URL$jslink.getPortletByName( Portlet Name ) Link to a portlet, using it's name, in the current page. This should be used with caution since the name may not be unique. Information about the PSML Document$jslink.Anonymoustrue is the user is NOT logged in, otherwise false.$jslink.GroupNameName of the current group, or "null" if not a group page.$jslink.RoleNameName of the current role, or "null" if not a role page.$jslink.UserNameName of the current user, or "null" if not a user page.$jslink.PageNameName of the current page.$jslink.MediaTypeMediaType of the current page.$jslink.CountryCountry of the current page.$jslink.LanguageLanguage of the current page.setLink()$jslink.setLink(.....) A way to define a link that allows many paramters. See the javadocs for org.apache.jetspeed.util.template.JetspeedLink or the JSLINK Example portlet. Example of Portlets Jetspeed include the following example of Velocity porlets. Portlet NameDescriptionHelloVelocityBasic Velocity portletJSLINK Example Display the uses of $jslink � 2000-2006, Apache Software Foundation