This ELResolver
will handle the resolution of attrs
when processing a composite component
instance.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass
<?> getCommonPropertyType
(ELContext context, Object base) attrs
is considered aString
property.getEvalMapFor
(UIComponent c, FacesContext ctx) Creates (if necessary) and caches anExpressionEvalMap
instance associated with the owningUIComponent
Class
<?> Readonly, so returnnull
.Ifbase
is a composite component andproperty
isattrs
, return a newExpressionEvalMap
which wraps the composite component's attributes map.boolean
isReadOnly
(ELContext context, Object base, Object property) Readonly, so returntrue
void
This is a no-op.Methods inherited from class jakarta.el.ELResolver
convertToType, invoke
-
Constructor Details
-
CompositeComponentAttributesELResolver
public CompositeComponentAttributesELResolver()
-
-
Method Details
-
getValue
If
base
is a composite component andproperty
isattrs
, return a newExpressionEvalMap
which wraps the composite component's attributes map.The
ExpressionEvalMap
simple evaluates anyValueExpression
instances stored in the composite component's attribute map and returns the result.If
base
is a composite component andproperty
isparent
attempt to resolve the composite componet parent of the current composite component by callingUIComponent.getCompositeComponentParent(jakarta.faces.component.UIComponent)
) and returning that value.- Specified by:
getValue
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base object whose property value is to be returned, ornull
to resolve a top-level variable.property
- The property or variable to be resolved.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, then the result of the variable or property resolution; otherwise undefined. - See Also:
-
getType
Readonly, so return
null
.- Specified by:
getType
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base object whose property value is to be analyzed, ornull
to analyze a top-level variable.property
- The property or variable to return the acceptable type for.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, the most general acceptable type which must benull
if the either the property or the resolver is read-only; otherwise undefined - See Also:
-
setValue
This is a no-op.
- Specified by:
setValue
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base object whose property value is to be set, ornull
to set a top-level variable.property
- The property or variable to be set.value
- The value to set the property or variable to.- See Also:
-
isReadOnly
Readonly, so return
true
- Specified by:
isReadOnly
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base object whose property value is to be analyzed, ornull
to analyze a top-level variable.property
- The property or variable to return the read-only status for.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, thentrue
if the property is read-only orfalse
if not; otherwise undefined. - See Also:
-
getCommonPropertyType
attrs
is considered aString
property.- Specified by:
getCommonPropertyType
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base object to return the most general property type for, ornull
to enumerate the set of top-level variables that this resolver can evaluate.- Returns:
null
if thisELResolver
does not know how to handle the givenbase
object; otherwiseObject.class
if any type ofproperty
is accepted; otherwise the most generalproperty
type accepted for the givenbase
.- See Also:
-
getEvalMapFor
Creates (if necessary) and caches an
ExpressionEvalMap
instance associated with the owningUIComponent
- Parameters:
c
- the owningUIComponent
ctx
- theFacesContext
for the current request- Returns:
- an
ExpressionEvalMap
for the specified component
-