code: private String getWrappedResourceName(Resource resource)
      {
          String resourceName = resource.getResourceName();
          if (resourceName != null)
          {
              return resourceName;
          }
  
          if (resource instanceof ResourceWrapper)
          {
              return getWrappedResourceName(((ResourceWrapper) resource).getWrapped());
          }
  
          return null;
      }
docs: Recursively unwarp the resource until we find the real resourceName
  This is needed because the JSF2 specced ResourceWrapper doesn't override
  the getResourceName() method :(
  @param resource
  @return the first non-null resourceName or <code>null</code> if none set