Monday, February 1, 2016

Custom ADF Skinning

       
<!-- trinidad-config.xml-->
     <?xml version="1.0" encoding="windows-1252"?>
      <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config"> 
       <skin-family>CustomSkin</skin-family>
      </trinidad-config>  
 
       
<!-- trinidad-skins.xml (create this file in the same parent folder as trinidad-config.xml)-->
       <?xml version="1.0" encoding="windows-1252"?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
    <skin>
        <id>Custom.desktop</id>
        <family>Custom</family>
        <extends>skyros-v1.desktop</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>skins/Custom/Custom.css</style-sheet-name>
        <bundle-name>com.fm.demoapp.view.skinBundle</bundle-name>
    </skin>
    <skin>
        <id>CustomSkin.desktop</id>
        <family>CustomSkin</family>
        <extends>alta-v1.desktop</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>resources/Skins/CustomSkin.css</style-sheet-name> <!--create css file and specify the folder path-->
          <bundle-name>com.fm.demoapp.view.skinBundle</bundle-name> <!--create skinBundle.properties in the package defined-->

    </skin>
</skins>
 
Oracle Fusion Middleware Tag Reference for Oracle ADF Faces Skin Selectors 

Update (web.xml) this context-param to true (make sure you change it back to false...before deploying the app to production environment); this reflects the changes made in 'css' without being to redeploy the ear again

 <context-param>
        <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs,
                     and saved state will be discarded when JSP's change. It will also automatically check if your
                     skinning css files have changed without you having to restart the server. This makes development
                     easier, but adds overhead. For this reason this parameter should be set to false when your
                     application is deployed.</description>
        <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
        <param-value>true</param-value> <!--by default it's false-->
    </context-param>

No comments: