{
_addSkinToFactory(skinFactory, skinNode, true);
}
// Add WEB-INF/trinidad-skins.xml skins to skin factory. (sorted first)
SkinsNode webInfSkinsNode = _getWebInfSkinsNode(context);
if (webInfSkinsNode != null)
{
List<SkinNode> webInfSkinNodes = webInfSkinsNode.getSkinNodes();
List<SkinNode> sortedWebInfSkinNodes = _sortSkinNodes(skinFactory, webInfSkinNodes);
// register skins found in webInfSkinNodes
for (SkinNode skinNode : sortedWebInfSkinNodes)
{
_addSkinToFactory(skinFactory, skinNode, false);
}
}
// register all the skin additions from META-INF trinidad-skins.xml and WEB-INF
// trinidad-skins.xml that we have stored in the metaInfSkinsNodeList object and the
// webInfSkinsNode object
// skin-additions are additions to a skin, not extensions. They are used by
// custom component developers that want to add a stylesheet for their components
// to a particular skin, like the simple skin.
FacesContext fContext = FacesContext.getCurrentInstance();
// register skin-additions from META-INF/trinidad-skins.xml files
_registerMetaInfSkinAdditions(fContext, skinFactory, metaInfSkinsNodeList);
// register skin-additions from WEB-INF/trinidad-skins.xml file
if (webInfSkinsNode != null)
{
List<SkinAdditionNode> skinAdditionNodeList = webInfSkinsNode.getSkinAdditionNodes();
_registerSkinAdditions(fContext, skinFactory, skinAdditionNodeList, false);
}
}