public TagHandler createTagHandler(String ns, String localName,
TagConfig tag) throws FacesException
{
if (ns != null && ns.startsWith(NAMESPACE_PREFIX))
{
ResourceHandler resourceHandler =
FacesContext.getCurrentInstance().getApplication().getResourceHandler();
if (ns.length() > NAMESPACE_PREFIX.length())
{
String libraryName = ns.substring(NAMESPACE_PREFIX.length());
for (String defaultSuffix : _defaultSuffixesArray)
{
String resourceName = localName + defaultSuffix;
if (handles(resourceName))
{
// MYFACES-3308 If a composite component exists, it requires to
// be always resolved. In other words, it should always exists a default.
// The call here for resourceHandler.createResource, just try to get
// the Resource and if it does not exists, it just returns null.
// The intention of this code is just create an instance and pass to
// CompositeComponentResourceTagHandler. Then, its values
// (resourceName, libraryName) will be used to derive the real instance
// to use in a view, based on the locale used.
Resource compositeComponentResourceWrapped
= resourceHandler.createResource(resourceName, libraryName);
if (compositeComponentResourceWrapped != null)
{
Resource compositeComponentResource
= new CompositeResouceWrapper(compositeComponentResourceWrapped);
ComponentConfig componentConfig = new ComponentConfigWrapper(tag,