public class CompositeComponentAttributesELResolver
extends javax.el.ELResolver
This ELResolver
will handle the resolution of attrs
when processing a composite component instance.
Modifier and Type | Class and Description |
---|---|
private static class |
CompositeComponentAttributesELResolver.ExpressionEvalMap
Simple Map implementation to evaluate any
ValueExpression
stored directly within the provided attributes map. |
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
COMPOSITE_COMPONENT_ATTRIBUTES_NAME
Implicit object related only to the cc implicitObject.
|
private static java.lang.String |
COMPOSITE_COMPONENT_PARENT_NAME
Implicit object related only to the cc implicit object
and refers to the composite component parent (if any).
|
private static java.lang.String |
EVAL_MAP_KEY
Key to which we store the mappings between composite component instances
and their ExpressionEvalMap.
|
private static java.util.logging.Logger |
LOGGER |
Constructor and Description |
---|
CompositeComponentAttributesELResolver() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getCommonPropertyType(javax.el.ELContext context,
java.lang.Object base)
attrs |
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.
|
private static final java.util.logging.Logger LOGGER
private static final java.lang.String COMPOSITE_COMPONENT_ATTRIBUTES_NAME
private static final java.lang.String COMPOSITE_COMPONENT_PARENT_NAME
private static final java.lang.String EVAL_MAP_KEY
public CompositeComponentAttributesELResolver()
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.
getValue
in class javax.el.ELResolver
ELResolver.getValue(javax.el.ELContext, Object, Object)
,
CompositeComponentAttributesELResolver.ExpressionEvalMap
public java.lang.Class<?> getType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
Readonly, so return null
.
getType
in class javax.el.ELResolver
ELResolver.getType(javax.el.ELContext, Object, Object)
public void setValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
This is a no-op.
setValue
in class javax.el.ELResolver
ELResolver.setValue(javax.el.ELContext, Object, Object, Object)
public boolean isReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
Readonly, so return true
isReadOnly
in class javax.el.ELResolver
ELResolver.isReadOnly(javax.el.ELContext, Object, Object)
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.
getFeatureDescriptors
in class javax.el.ELResolver
ELResolver.getFeatureDescriptors(javax.el.ELContext, Object)
public java.lang.Class<?> getCommonPropertyType(javax.el.ELContext context, java.lang.Object base)
attrs
is considered a
String
property.
getCommonPropertyType
in class javax.el.ELResolver
ELResolver.getCommonPropertyType(javax.el.ELContext, Object)
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
c
- the owning UIComponent
ctx
- the FacesContext
for the current requestExpressionEvalMap
for the specified componentCopyright © 2002-2013 Oracle America, Inc. All Rights Reserved.