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

Sample Portlets

This section provides fully developed samples of custom portlets. The chapter includes complete code for portlet deployment descriptors, JSP pages, resource files, and action classes as applicable for each portlet. The following sample portlets are provided:

  • Welcome is a simple display portlet which has no interactive capabilities. Because it is internationalized, it displays text in the user's locale (language and country) preference.

  • FormExample is an interactive form portlet that accepts free-form input and displays it back to the user.

    FormExample portlet screen capture with text displayed back to the user

  • DisplayURL is a portlet template (also referred to as an editable portlet), which is a portlet from which users can create their own portlet instances. The DisplayURL portlet template, which is delivered with the portal Web application, enables users to create portlets that return HTML content from any URL.

  • HelloUserWikExample is a Web application that is enabled by SAS Foundation Services. The application displays the string Hello user, where user is the name of the user who is logged on to the portal Web application.

  • HelloUserRemotePortlet is a remote portlet that executes the sample Web application HelloUserWikExample and displays the name of the user who is logged on to the portal Web application.

    HelloUserRemotePortlet screen capture

For detailed information about a specific portlet development task, see Development Steps. For general information about creating various types of portlets, see Use Cases.