Class CompositeComponentAttributesELResolver

java.lang.Object
jakarta.el.ELResolver
com.sun.faces.el.CompositeComponentAttributesELResolver

public class CompositeComponentAttributesELResolver extends jakarta.el.ELResolver

This ELResolver will handle the resolution of attrs when processing a composite component instance.

  • Constructor Details

    • CompositeComponentAttributesELResolver

      public CompositeComponentAttributesELResolver()
  • Method Details

    • getValue

      public Object getValue(jakarta.el.ELContext context, Object base, Object property)

      If base is a composite component and property is attrs, return a new ExpressionEvalMap which wraps the composite component's attributes map.

      The ExpressionEvalMap simple evaluates any ValueExpression instances stored in the composite component's attribute map and returns the result.

      If base is a composite component and property is parent attempt to resolve the composite componet parent of the current composite component by calling UIComponent.getCompositeComponentParent(jakarta.faces.component.UIComponent)) and returning that value.

      Specified by:
      getValue in class jakarta.el.ELResolver
      See Also:
      • ELResolver.getValue(jakarta.el.ELContext, Object, Object)
      • CompositeComponentAttributesELResolver.ExpressionEvalMap
    • getType

      public Class<?> getType(jakarta.el.ELContext context, Object base, Object property)

      Readonly, so return null.

      Specified by:
      getType in class jakarta.el.ELResolver
      See Also:
      • ELResolver.getType(jakarta.el.ELContext, Object, Object)
    • setValue

      public void setValue(jakarta.el.ELContext context, Object base, Object property, Object value)

      This is a no-op.

      Specified by:
      setValue in class jakarta.el.ELResolver
      See Also:
      • ELResolver.setValue(jakarta.el.ELContext, Object, Object, Object)
    • isReadOnly

      public boolean isReadOnly(jakarta.el.ELContext context, Object base, Object property)

      Readonly, so return true

      Specified by:
      isReadOnly in class jakarta.el.ELResolver
      See Also:
      • ELResolver.isReadOnly(jakarta.el.ELContext, Object, Object)
    • getFeatureDescriptors

      public Iterator<FeatureDescriptor> getFeatureDescriptors(jakarta.el.ELContext context, Object base)

      This ELResolver currently returns no feature descriptors as we have no way to effectively iterate over the UIComponent attributes Map.

      Overrides:
      getFeatureDescriptors in class jakarta.el.ELResolver
      See Also:
      • ELResolver.getFeatureDescriptors(jakarta.el.ELContext, Object)
    • getCommonPropertyType

      public Class<?> getCommonPropertyType(jakarta.el.ELContext context, Object base)

      attrs is considered a String property.

      Specified by:
      getCommonPropertyType in class jakarta.el.ELResolver
      See Also:
      • ELResolver.getCommonPropertyType(jakarta.el.ELContext, Object)
    • getEvalMapFor

      public Map<String,Object> getEvalMapFor(UIComponent c, FacesContext ctx)

      Creates (if necessary) and caches an ExpressionEvalMap instance associated with the owning UIComponent

      Parameters:
      c - the owning UIComponent
      ctx - the FacesContext for the current request
      Returns:
      an ExpressionEvalMap for the specified component