SAS 9.1.3 Integration Technologies » SAS Web Infrastructure Kit: Developer's Guide


Developing Custom Portlets
Development Steps
Creating a Deployment Descriptor
Creating Display Resources Files
Developing the Presentation JSP Page
Creating Action Classes
Implementing Portlet Help
Creating a PAR File
Use Cases
Simple Display Portlet
Localized Portlet
Portlet Template (Editable Portlet)
Remote Portlet
Tips and Best Practices
Using the Portlet API
Sample Portlets
Localized Display Portlet (Welcome)
Interactive Form Portlet (FormExample)
Portlet Template, or Editable Portlet (DisplayURL)
Web Application (HelloUserWikExample)
Remote Portlet (HelloUserRemote
Portlet
Developing Custom Portlets

Development Steps

This section provides step-by-step instructions for tasks that developers can or must perform when creating custom portlets. The tasks include the following:

  • Creating a portlet deployment descriptor (portlet.xml). Each portlet that you deploy must be defined in a portlet deployment descriptor. A portlet deployment descriptor is an XML file that provides all of the information that the portal Web application requires in order to deploy one or more portlets. The file includes information about the portlet's initialization, actions, security settings, and resource paths.

  • Creating display resources files (portletDisplayResources_xx.properties). The display resources file contains text strings for the portlet's title and description for use in the portlet's metadata. If you create multiple display resources files for different locales, the portal Web application uses these files to localize the portlet title and description at the time of deployment, according to the portal Web application's default locale.

  • Developing the presentation JavaServer Page (JSP) pages. Each portlet must have a JSP page to serve as the presentation component.

  • Creating action classes. You can use the resources of the Portlet Development Kit to develop the following types of action classes for your portlets: initializer classes, portlet actions, postprocessing classes, and error handling classes.

  • Implementing portlet help. If you want to provide customized use instructions for a portlet, you can create an action class with an associated JSP page that contains the help text. When the user clicks a help button in the portlet's title bar, the help appears in a pop-up window.

  • Creating a portlet archive (PAR) file for deployment in the portal. To enable automatic deployment of a portlet into the portal Web application, you must provide a PAR file which contains all of the needed files. A PAR file can contain files for one portlet or for multiple related portlets.

For practical applications of these tasks, see Use Cases. For examples of fully developed portlet code, see the Sample Portlets.