Welcome to Apache Portals Gems

Get Portals Gems

Download Portals Applications Gems 1.1

Gems is a collection of portlets that are beyond categorization into applications and are completely portable to the Portlet API (1.0 or 2.0) Gems is a subproject of the Apache Portals Applications project. You can download the jar file, or download individual portlet packages containing Java code, JSPs, and portlet.xml.

Gems Catalog

As of version 1.1, here is the collection of Gems portlets available in our portlet catalog

Browser Portlet

Portlet Class Description
Browser Portlet org.apache.portals.applications.gems.browser.BrowserPortlet A generic browser portlet that displays tabular rows of data in a table with paging controls. The Database Browser Portlet extends this class.

Preferences

Name Example Value Description
WindowSize 15 The size of the browser window page

Example

Address Event Portlet

Portlet Class Description
Address Event Portlet org.apache.portals.gems.address.AddressEventPortlet Leverages Portlet 2.0 Event API for inter-portlet communication. Publishes an event for an address typed in. The Google Map portlet subscribes to Address events and displays the address on a map in a portlet.

Preferences

none

Example

File Portlet

Portlet Class Description
File Portlet org.apache.portals.gems.file.FilePortlet Displays the content of a file in a portlet. Usually the file is of the HTML content type.

Preferences

Name Example Value Description
file /WEB-INF/view/info/welcome.html The name of the file to display, web-app relative or file system relative depending on useFilesystem Init Parameter, see below

Init Parameters

Name Example Value Description
useLanguage true | false boolean, should this portlet use a language fallback algorithm to locate files, defaults to false
useFilesystem true | false boolean, should we look in the file system or in a webapp relative path, defaults to false
folder string, base location of the folder to start searching in, applies to webapp and filesystem mounts

Example

Flash Portlet

Portlet Class Description
Flash Portlet org.apache.portals.gems.flash.FlashPortlet .

Preferences

Name Example Value Description
SRC /demo/SWF/Clock.swf The URL of the Flash or Flex resource file to display in Normal Window State
HEIGHT 300 The height of the Flash or Flex window when in Normal Window State
WIDTH 100% The width of the Flash or Flex window when in Normal Window State. Can be a percentage of available space to the portlet, or a constant value
MAX-SRC /demo/SWF/Clock.swf The URL of the Flash or Flex resource file to display in Maximized Window State
MAX-HEIGHT 800 The height of the Flash or Flex window when in Maximized Window State
MAX-WIDTH 100% The width of the Flash or Flex window when in Maximized Window State. Can be a percentage of available space to the portlet, or a constant value

Init Parameters

Name Example Value Description
object-params use semicolon to separate each pair and equals to separate name and value for object-params (url-encoding should not be used except for non-delimiter occurrences of ';' and '=' chars)
object-attributes use semicolon to separate each pair and equals to separate name and value for object-attributes (url-encoding should not be used except for non-delimiter occurrences of ';' and '=' chars)
flashvars use semicolon to separate each pair and equals to separate name and value for flashvars (url-encoding should not be used except for non-delimiter occurrences of ';' and '=' chars)
SwfObjectsLibUrl /jetspeed/javascript/swfobject/swfobject.js Change the swbobject.js url link below. This link will be used to generate html tags. The following is just an example with default deployment of Jetspeed

Example

Google Maps Portlet

Portlet Class Description
Google Maps Portlet org.apache.portals.gems.googlemaps.GoogleMapsPortlet Displays a Google Map in a portlet. Requires a key to be registered with Google for your website. Works fine with localhost out of box.

Preferences

Name Example Value Description
Location Portland, Oregon Any address or city in the world
MapHeight 400px The size of the map area in the portlet
APIKey (Your API Key from Google) A Google Maps API Key acquired from Google. This is a required portlet preference.

Example