Monday, May 11, 2015

Webcenter portal/ADF Skin Resource Bundle

The text used in a skin like 'Detach' button in a panel collection is defined in a resource bundle. you can override the text by creating a custom resource bundle and declaring only the text you want to change. After you create your custom resource bundle, register it with the skin.

Sample of a skin resource bundle

       

af_panelCollection.LABEL_DETACH_TABLE_DLG = Detach

af_panelCollection.LABEL_MENUITEM_DETACH = Detach

af_panelCollection.TIP_BUTTON_DETACH = Detach

af_dialog.LABEL_OK=Ok

af_dialog.LABEL_CANCEL=cancel

af_query.LABEL_RESET=Reset

af_query.LABEL_OK=Ok

In ADF:

To Register the skin resource bundle, edit trinidad-skins.xml in your ADF Application and add the <bundle-name> tag with the Resource bundle path:

       

<?xml version="1.0" encoding="windows-1252" ?>

<skins xmlns="http://myfaces.apache.org/trinidad/skin">

  <skin>

    <id>myskin.desktop</id>

    <family>myskin</family>

    <extends>skyros-v1.desktop</extends>

    <style-sheet-name>css/layout.css</style-sheet-name>

    <bundle-name>com/mycompany/myproject/view/bundle.myBundle</bundle-name>

  </skin>

</skins>

       
 

Don't forget to use your custom skin by editing trinidad-config.xml:

       

<?xml version="1.0" encoding="windows-1252"?>

<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">

  <skin-family>myskin</skin-family>

</trinidad-config>

       
 

In Webcenter Portal (Using Spaces (Portal Builder)):

Go to the \Middleware\Oracle_WC1\webcenter\modules\oracle.portlet.server_11.1.1 and edit oracle.webcenter.skin.ear\APP-INF\lib\spaces-web-skin.jar\META-INF\trinidad-skins.xml

Find the main skin you are already extending in Spaces and add the <bundle-name> with your bundle path.
but make sure that the bundle is already exist in a shared library that Webcenter portal is already referring to.
And also keep in mind that this change will affect the whole portal application, so if you removed the shared library that contain the Resource bundle, the whole portal application will fail to start.

       
  <!-- Fusion skins -->

  <skin>

    <id>webcenter-fusion-internal.desktop</id>

    <family>webcenter-fusion-internal</family>

    <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>

    <style-sheet-name>adf/spaces/skins/webcenter-fusion-internal/webcenter-fusion-internal.css</style-sheet-name>

    <extends>fusionFx-v1.3.desktop</extends>

     <bundle-name>com/mycompany/myproject/view/bundle.myBundle</bundle-name>

  </skin>

       
 

Restart Spaces.




Multilingual Portal Implementation with Webcenter Portal 11.1.1.8

In this article 'Namit Kakkar' walks you through one use case on how to implement a multilingual Portal.

Full Article