This ELResolver will handle the resolution of attrs when processing a composite component
instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> getCommonPropertyType(ELContext context, Object base) attrsis considered aStringproperty.getEvalMapFor(UIComponent c, FacesContext ctx) Creates (if necessary) and caches anExpressionEvalMapinstance associated with the owningUIComponentClass<?> Readonly, so returnnull.Ifbaseis a composite component andpropertyisattrs, return a newExpressionEvalMapwhich wraps the composite component's attributes map.booleanisReadOnly(ELContext context, Object base, Object property) Readonly, so returntruevoidThis is a no-op.Methods inherited from class jakarta.el.ELResolver
convertToType, invoke
-
Constructor Details
-
CompositeComponentAttributesELResolver
public CompositeComponentAttributesELResolver()
-
-
Method Details
-
getValue
If
baseis a composite component andpropertyisattrs, return a newExpressionEvalMapwhich wraps the composite component's attributes map.The
ExpressionEvalMapsimple evaluates anyValueExpressioninstances stored in the composite component's attribute map and returns the result.If
baseis a composite component andpropertyisparentattempt to resolve the composite componet parent of the current composite component by callingUIComponent.getCompositeComponentParent(jakarta.faces.component.UIComponent)) and returning that value.- Specified by:
getValuein classELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be returned, ornullto resolve a top-level variable.property- The property or variable to be resolved.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, then the result of the variable or property resolution; otherwise undefined. - See Also:
-
getType
Readonly, so return
null.- Specified by:
getTypein classELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be analyzed, ornullto analyze a top-level variable.property- The property or variable to return the acceptable type for.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, the most general acceptable type which must benullif the either the property or the resolver is read-only; otherwise undefined - See Also:
-
setValue
This is a no-op.
- Specified by:
setValuein classELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be set, ornullto 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:
isReadOnlyin classELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be analyzed, ornullto analyze a top-level variable.property- The property or variable to return the read-only status for.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, thentrueif the property is read-only orfalseif not; otherwise undefined. - See Also:
-
getCommonPropertyType
attrsis considered aStringproperty.- Specified by:
getCommonPropertyTypein classELResolver- Parameters:
context- The context of this evaluation.base- The base object to return the most general property type for, ornullto enumerate the set of top-level variables that this resolver can evaluate.- Returns:
nullif thisELResolverdoes not know how to handle the givenbaseobject; otherwiseObject.classif any type ofpropertyis accepted; otherwise the most generalpropertytype accepted for the givenbase.- See Also:
-
getEvalMapFor
Creates (if necessary) and caches an
ExpressionEvalMapinstance associated with the owningUIComponent- Parameters:
c- the owningUIComponentctx- theFacesContextfor the current request- Returns:
- an
ExpressionEvalMapfor the specified component
-