FacesContext context = getFacesContext();
Object requestedSkinId = getRequestMapSkinId(context);
if (requestedSkinId != null)
{
SkinFactory factory = SkinFactory.getFactory();
if (factory == null)
{
_LOG.warning("NO_SKIN_FACTORY");
return null;
}
Skin requestedSkin = factory.getSkin(context, requestedSkinId.toString());
if (requestedSkin != null)
{
// In portlet mode, we will switch to using the requestedSkin
// (the skin requested by the portlet's producer on the requestMap) if it exists.
// Otherwise we'll use the portal skin.