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
Development Steps

Creating Action Classes

You can use the resources of the SAS Web Infrastructure Kit to develop the following types of action classes for your local portlets:

The Portlet API includes classes that you can use to create your own action classes for custom portlets. For a summary of these classes, see Using the Portlet API. For detailed information about the Portlet API, see the class documentation.

Any action classes that you develop must be defined in the portlet's deployment descriptor file and included in the portlet's PAR file. These classes cannot be accessed by the portlet's JavaServer Page (JSP) pages.

Note: You can also develop classes other than action classes for your portlet and include them in the portlet's PAR file. These classes do not need to be defined in the portlet deployment descriptor file.

Thread Safety

Portlet actions, like Struts actions, are multithreaded. There will be only a single instance of your PortletAction subclass, and you must make your actions thread-safe, as follows:

  • You cannot use class properties to share values between member methods.

  • If you use member methods, be sure to pass all values through the method's signature. The signature passes all values through the thread-safe stack.