Configure portlets to support shared configuration

+

Search Tips   |   Advanced Search

 

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 or portal products from other vendors. For more background information about compatibility of such portlets with WebSphere Portal refer to Compatibility with portlets that do not support the edit_defaults portlet mode.

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, 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, 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:

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:

Manage portlets and portlet applications

 

Related concepts


Configuration levels for portlets
Preference layers and portlet modes