java.lang.Object
jakarta.el.ELResolver
com.sun.faces.el.ResourceELResolver
public class ResourceELResolver
extends jakarta.el.ELResolver
ELResolver to resolve expressions like the following:
- #{resource['library:resource']}
- #{resource['resource']}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> getCommonPropertyType(jakarta.el.ELContext context, Object base) Class<?> If base and property are notnulland base is an instance ofResourceHandler, perform the following: Ifpropertydoesn't contain:treatpropertyas the resource name and passpropertytoResourceHandler.createResource(String)Ifpropertycontains a single:treat the content before the:as the library name, and the content after the:to be the resource name and pass both toResourceHandler.createResource(String, String)Ifpropertycontains more than one:then throw aELExceptionIf one of the above steps resulted in the creation of aResourceinstance, callELContext.setPropertyResolved(true)and return the result ofResource.getRequestPath()booleanisReadOnly(jakarta.el.ELContext context, Object base, Object property) voidThis is basically a no-op.Methods inherited from class jakarta.el.ELResolver
convertToType, invoke
-
Constructor Details
-
ResourceELResolver
public ResourceELResolver()
-
-
Method Details
-
getValue
If base and property are notnulland base is an instance ofResourceHandler, perform the following:- If
propertydoesn't contain:treatpropertyas the resource name and passpropertytoResourceHandler.createResource(String) - If
propertycontains a single:treat the content before the:as the library name, and the content after the:to be the resource name and pass both toResourceHandler.createResource(String, String) - If
propertycontains more than one:then throw aELException - If one of the above steps resulted in the creation of a
Resourceinstance, callELContext.setPropertyResolved(true)and return the result ofResource.getRequestPath()
- Specified by:
getValuein classjakarta.el.ELResolver- See Also:
- If
-
getType
- Specified by:
getTypein classjakarta.el.ELResolver- Returns:
nullas this resolver only performs lookups- Throws:
jakarta.el.PropertyNotFoundException- if base and property are null
-
setValue
This is basically a no-op.- Specified by:
setValuein classjakarta.el.ELResolver- Throws:
jakarta.el.PropertyNotFoundException- if base and property are null
-
isReadOnly
- Specified by:
isReadOnlyin classjakarta.el.ELResolver- Returns:
false(basically ignored by the EL system)- Throws:
jakarta.el.PropertyNotFoundException- if base and property are null
-
getCommonPropertyType
- Specified by:
getCommonPropertyTypein classjakarta.el.ELResolver- Returns:
String.class- getType() expects String properties
-