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
Sample: Localized Display Portlet (Welcome Portlet)

Step 6: Create Translated Titles and Descriptions

Display resource files called portletDisplayResources.properties contain translated titles and descriptions for the Welcome portlet. These files contain text to be used in creating the metadata that describes the portlet.

When the portlet is first deployed, the deployment process checks to see which default locale was specified when the portal Web application was installed. Based on this locale, it uses the title and description from the appropriate display resource file to create metadata and register the portlet in the SAS Metadata Repository.

Note: The SAS Metadata Repository cannot store multiple, localized values for metadata. Therefore, the title and description are translated only into the portal Web application's default locale. They cannot be translated based on the user's locale preference.

A number of display resource files are provided for the Welcome portlet. The contents of two of the files (portletDisplayResources_de.properties and portletDisplayResources_en.properties) follow. (Note: Add the word "Sample" to the name and description in order to distinguish this portlet from the Welcome portlet that is delivered with the portal.)


portlet.title=Begrüßungs-Portlet Muster
portlet.description=Begrüßungs-Portlet Muster

portlet.title=Welcome Portlet Sample
portlet.description=Welcome Portlet Sample