com.sun.faces.el
Class CompositeComponentAttributesELResolver

java.lang.Object
  extended by javax.el.ELResolver
      extended by com.sun.faces.el.CompositeComponentAttributesELResolver

public class CompositeComponentAttributesELResolver
extends javax.el.ELResolver

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


Field Summary
 
Fields inherited from class javax.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
CompositeComponentAttributesELResolver()
           
 
Method Summary
 java.lang.Class<?> getCommonPropertyType(javax.el.ELContext context, java.lang.Object base)
           attrs is considered a String property.
 java.util.Map<java.lang.String,java.lang.Object> getEvalMapFor(javax.faces.component.UIComponent c, javax.faces.context.FacesContext ctx)
           Creates (if necessary) and caches an ExpressionEvalMap instance associated with the owning UIComponent
 java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)
           This ELResolver currently returns no feature descriptors as we have no way to effectively iterate over the UIComponent attributes Map.
 java.lang.Class<?> getType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
           Readonly, so return null.
 java.lang.Object getValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
           If base is a composite component and property is attrs, return a new ExpressionEvalMap which wraps the composite component's attributes map.
 boolean isReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
           Readonly, so return true
 void setValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
           This is a no-op.
 
Methods inherited from class javax.el.ELResolver
invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeComponentAttributesELResolver

public CompositeComponentAttributesELResolver()
Method Detail

getValue

public java.lang.Object getValue(javax.el.ELContext context,
                                 java.lang.Object base,
                                 java.lang.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(javax.faces.component.UIComponent)) and returning that value.

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

getType

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

Readonly, so return null.

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

setValue

public void setValue(javax.el.ELContext context,
                     java.lang.Object base,
                     java.lang.Object property,
                     java.lang.Object value)

This is a no-op.

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

isReadOnly

public boolean isReadOnly(javax.el.ELContext context,
                          java.lang.Object base,
                          java.lang.Object property)

Readonly, so return true

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

getFeatureDescriptors

public java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(javax.el.ELContext context,
                                                                              java.lang.Object base)

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

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

getCommonPropertyType

public java.lang.Class<?> getCommonPropertyType(javax.el.ELContext context,
                                                java.lang.Object base)

attrs is considered a String property.

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

getEvalMapFor

public java.util.Map<java.lang.String,java.lang.Object> getEvalMapFor(javax.faces.component.UIComponent c,
                                                                      javax.faces.context.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


Copyright © 2011 Oracle America, Inc. All Rights Reserved.