+

Search Tips   |   Advanced Search


Dynamically setting the portlet title in the JSR 286 Web Content Viewer

With the JSR Web Content Viewer you can dynamically set the portlet title, which is displayed in the portlet title bar.

The portlet title can be set in the portlet's Configure mode or Edit shared settings mode. You can specify the title text either with a static phrase or with a resource bundle, which allows the portlet title to be displayed in different languages.

The dynamic title is not supported with the PortalWeb2 theme.

  1. Select either Configure or Edit shared settings from the drop-down menu located in the portlet title bar.

  2. Select a title option.

    • Select Use default title to display the title that was set for the portlet in the portal administration.

    • Select Set the following title, and enter a title that should be used for all languages. If the input field is left empty, the default title is used. To explicitly set the title to be empty, enter a blank.

    • Select Select from Resource bundle, and enter the fully qualified name of the Java™ resource bundle that is used to set the title, depending on the user's language (for example, com.mycompany.myapplication.myresourcebundlename).

      The structure of the resource bundle must follow the specification defined by the Java java.lang.ResourceBundle class.

      The key that is used to look up the title in the resource bundle is javax.portlet.title.

      The resource bundle must be located in a directory that is part of the classpath of the Web Content Viewer. The preferred way to do this is to create a new shared library that contains the custom resource bundle files using the administrative console. Creating a new shared library that contains the resource bundle allows a clean separation of the custom resource bundle code from the base WebSphere Portal code. After creating a shared library, add it to the classpath of WebSphere Portal appserver classloader.

    • Select Select from content to display the Display title of the currently rendered content.


Parent topic:

Use the JSR 286 Web Content Viewer


Related tasks


Websphere Application Server information center: Shared library collection
Java 2 Platform Standard: Class ResourceBundle