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
-
Method Summary
Modifier and TypeMethodDescriptionClass
<?> getCommonPropertyType
(jakarta.el.ELContext context, Object base) Class
<?> If base and property are notnull
and base is an instance ofResourceHandler
, perform the following: Ifproperty
doesn't contain:
treatproperty
as the resource name and passproperty
toResourceHandler.createResource(String)
Ifproperty
contains 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)
Ifproperty
contains more than one:
then throw aELException
If one of the above steps resulted in the creation of aResource
instance, callELContext.setPropertyResolved(true)
and return the result ofResource.getRequestPath()
boolean
isReadOnly
(jakarta.el.ELContext context, Object base, Object property) void
This 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 notnull
and base is an instance ofResourceHandler
, perform the following:- If
property
doesn't contain:
treatproperty
as the resource name and passproperty
toResourceHandler.createResource(String)
- If
property
contains 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
property
contains more than one:
then throw aELException
- If one of the above steps resulted in the creation of a
Resource
instance, callELContext.setPropertyResolved(true)
and return the result ofResource.getRequestPath()
- Specified by:
getValue
in classjakarta.el.ELResolver
- See Also:
- If
-
getType
- Specified by:
getType
in classjakarta.el.ELResolver
- Returns:
null
as this resolver only performs lookups- Throws:
jakarta.el.PropertyNotFoundException
- if base and property are null
-
setValue
This is basically a no-op.- Specified by:
setValue
in classjakarta.el.ELResolver
- Throws:
jakarta.el.PropertyNotFoundException
- if base and property are null
-
isReadOnly
- Specified by:
isReadOnly
in classjakarta.el.ELResolver
- Returns:
false
(basically ignored by the EL system)- Throws:
jakarta.el.PropertyNotFoundException
- if base and property are null
-
getCommonPropertyType
- Specified by:
getCommonPropertyType
in classjakarta.el.ELResolver
- Returns:
String.class
- getType() expects String properties
-