ADF: Switching between skins on runtime based on the url
Andrejus posted a couple of months ago how to switch between alta and skyros in ADF 12c. This is a cool way to start the migration from 11g to 12c and Alta UI. I am going to show you another way to use one skin or other based on the page you are.
Firstly we have to create a bean and a property inside it where we are going to store the current skin. We have to set this bean as sessionBean.
After that we have to set a bean property in skin-family in our trinidad-config so we can set the skin dynamicaly.
The next step is to create a filter. In doFilter we are going to evaluate the URL and set the skin based on that value. We also have to instantiate the bean and add it to sessionScope becasuse the first time it will be null.
Once we have the filter created we have to add it to web.xml
Now that we have all setup, having multiple pages, if we test it we can see that the the page “alta” will display AltaUI skin and “skyros” page wil dispklay Skyros skin,