In my previous blog, i explained how to build a Skin for ADF application. It is not very productive to build skin, deploy as ADF Library JAR and test in ADF application. Fortunately there are features to dynamically update skin file changes to running application.
First prepare your ADF application to accept dynamic skin changes.
Go to your Web Project’s properties. Select ADF View. Check Enable Runtime Skin Updates.
Go to Libraries and Classpath section of your Web project’s properties. Add ADF Faces JMX Runtime 11 library.
Modify web.xml file of your Web project with following properties set to true (org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION, org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION). These both properties must be set to false for Production environment.
Now we are ready to work on Skin changes. Start your application by running jsf page, wait till application is started and accessible in web browser.
Now, start Skin editor. Open ADF Skin application previously created. (Note that we created ADF Skin application in previous blog and added ADF Library JAR from that project to our ADF application’s web project).
Run Deployment Profile for Skin project in Skin Editor (right click on Project – Deploy and then select Deployment Profile name). Now select Deploy to ADF Skin Managed Bean as deployment action.
Click Next. Create connection to Embedded WebLogic server as shown below. You can click Test Connection to check if your connection information is valid or not.
Click Find Running Applications, you should see your application’s context root in Application Name drop down.
Click Finish and watch logs in Deployment window.
Let’s make change to button text color and deploy skin again.
Once skin is deployed with this change, you should see that button color has changed from Red to Aqua.