(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ?????
throw new PropertyNotFoundException(message);
}
Object ret = null;
if (base instanceof ResourceHandler) {
ResourceHandler handler = (ResourceHandler) base;
String prop = property.toString();
Resource res;
if (!prop.contains(":")) {
res = handler.createResource(prop);
} else {
if (!isPropertyValid(prop)) {
// RELEASE_PENDING i18n
throw new ELException("Invalid resource format. Property " + prop + " contains more than one colon (:)");
}
String[] parts = Util.split(prop, ":");
// If the enclosing entity for this expression is itself
// a resource, the "this" syntax for the library name must
// be supported.
if (null != parts[0] && parts[0].equals("this")) {
FacesContext facesContext = FacesContext.getCurrentInstance();
UIComponent currentComponent = UIComponent.getCurrentCompositeComponent(facesContext);
Resource componentResource = (Resource)
currentComponent.getAttributes().get(Resource.COMPONENT_RESOURCE_KEY);
if (null != componentResource) {
String libName = null;
if (null != (libName = componentResource.getLibraryName())) {
parts[0] = libName;
}
}
}
res = handler.createResource(parts[1], parts[0]);
}
if (res != null) {
ret = res.getRequestPath();
}
context.setPropertyResolved(true);