Skip to end of metadata
Go to start of metadata

This section mentions code from Portal Extension Example from the [GateIn Portal Quickstarts |Appendix - Code Examples alias Quickstarts] collection.

There are two resource bundle customization scenarios possible with a Portal Extension:

  • to add new resource bundle items to the ones available in default GateIn Portal installation and
  • to assign new values to resource bundle items available in default GateIn Portal installation

Both scenarios can be demonstrated on locale.portal.extension resource bundle. To use this bundle we need to include it in both init.resources and portal.resource.names parameters of BaseResourceBundlePlugin in war/src/main/webapp/WEB-INF/conf/sample-ext/common/common-configuration.xml:

Code Snippet error: Unable to retrieve the URL: https://github.com/gatein/gatein-portal-quickstart/blob/master/gatein-portal-extension/war/src/main/webapp/WEB-INF/conf/sample-ext/common/common-configuration.xml status code: 404.

The English version of locale.portal.extension can be found under war/src/main/webapp/WEB-INF/classes/locale/portal/extension_en.properties:

Code Snippet error: Unable to retrieve the URL: https://github.com/gatein/gatein-portal-quickstart/blob/master/gatein-portal-extension/war/src/main/webapp/WEB-INF/classes/locale/portal/extension_en.properties status code: 404.

UIHomePagePortlet.Label.SubSlogan is a new key which is not available in default GateIn Portal installation.

However, UIHomePagePortlet.Label.Slogan is redefined in extension_en.properties shown above. In gatein.ear/web.war/WEB-INF/classes/locale/portlet/web/GroovyPortlet_en.properties it is already defined as

and here, within the Portal Extension we assign a new value Congratulations! to it.

Please refer to the previous section for more details on internationalization of navigation nodes.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 30, 2013

    I am having issues with those included code snippets rendering in the page. It may be intermittent.

    When I try to directly access the content by pasting the link from the wiki markup, I also get a github 404.

    After updating the links to:

    https://github.com/gatein/gatein-portal-quickstart/blob/master/gatein-portal-extension/war/src/main/webapp/WEB-INF/conf/sample-ext/common/common-configuration.xml

    and

    https://github.com/gatein/gatein-portal-quickstart/blob/master/gatein-portal-extension/war/src/main/webapp/WEB-INF/classes/locale/portal/extension_en.properties

    They displayed in the code perfectly once. Then failed to do so afterwards.