Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows
Configure portlets to support shared configuration
This topic describes how you set up portlets that do not support the edit_defaults portlet mode for shared configuration.
Portlet programmers can write portlets that comply to the Standard Portlet API so that they support changes to the shared configuration. They do so by using the custom portlet mode edit_defaults.
Some Standard API portlets might not support the custom portlet mode edit_defaults. Consequently, they do not support changes to the shared configuration, but only to the personal configuration. This typically applies to portlets that were written for previous versions of WebSphere Portal Express or portal products from other vendors.
An administrator cannot set up the configuration of such portlets for all users if they are placed on a shared page. (The icon or pull-down menu selection option for editing the shared configuration for the portlet is not available on the portlet title bar.) In order to be able to set up shared configuration for such portlets, it is necessary to enable a special compatibility mode by editing the portlet.xml deployment descriptor in the portlet WAR file and updating the portlet by redeploying it.
For each portlet in the portlet application for which you want to enable editing of the shared configuration, you need to declare the new portlet mode edit_defaults_compatibility in addition to the supported edit mode as shown in the following code snippet:
<supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> <portlet-mode>edit</portlet-mode> <!-- edit mode MUST be supported --> <portlet-mode>edit_defaults_compatibility</portlet-mode> . . . more supported modes . . . </supports>Additionally, after the last <portlet> tag in the deployment descriptor, declare the new mode as a custom portlet mode:
. . . </portlet> <custom-portlet-mode> <portlet-mode>edit_defaults_compatibility</portlet-mode> </custom-portlet-mode> . . .Use a validating XML editor to check the modified portlet.xml against the XSD defined by the portlet standard specification before deploying or updating the portlet.
For more information refer to the following sources:
- For more details about configuration layers and portlet modes in WebSphere Portal Express refer to Preference layers and portlet modes.
- For more details about configuring portlets and shared configuration refer to Configuration levels for portlets.
- For details about the edit_defaults tag refer to the topic <portal-skin/> tags under the tag <portal-skin:portletEditDefaults/>.
- For the standard portlet API specification refer to http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd .
Notes:
- Consumer-side configuration of consumed portlets that do not support shared configuration is not supported with WSRP. The configuration of the edit_defaults_compatibility portlet mode is not supported for portlets that are consumed by using WSRP.
- The portlet modes are rendered under different names in the portal user interface. The names can depend on the customization of the portal.
- The modes edit_defaults and edit_defaults_compatibility mode are mutually exclusive. A portlet can support only one of them at a time.
Parent topic:
Managing portlets and portlet applicationsRelated concepts
Configuration levels for portlets Preference layers and portlet modes