public final class ContextualCompositeValueExpression
extends jakarta.el.ValueExpression
This specialized ValueExpression enables the evaluation of composite component expressions. Instances of
this expression will be created when
TagAttributeImpl.getValueExpression(jakarta.faces.view.facelets.FaceletContext, Class)
is invoked and the expression represents a composite component expression (i.e. #{cc.[properties]}).
It's important to note that these ValueExpressions are context sensitive in that they leverage the
location in which they were referenced in order to push the proper composite component to the evaluation context
prior to evaluating the expression itself.
Using Page test.xhtml
---------------------------------
<ez:comp1 greeting="Hello!" />
comp1.xhtml
---------------------------------
<composite:interface>
<composite:attribute name="greeting" type="java.lang.String" required="true" />
</composite:interface>
<composite:implementation>
<ez:nesting>
<h:outputText value="#{cc.attrs.greetings}" />
</ez:nesting>
</composite:implementation>
nesting.xhtml
---------------------------------
<composite:interface />
<composite:implementation>
<composite:insertChildren>
</composite:implementation>
In the above example, there will be two composite components available to the runtime: ez:comp1 and
ez:nesting.
When <h:outputText value="#{cc.attrs.greeting}" />, prior to attempting to evaluate the expression, the
Location object will be used to find the composite component that 'owns' the template in which the expression
was defined in by comparing the path of the Location with the name and library of the
Resource instance associated with each composite component. If a matching composite
component is found, it will be made available to the EL by calling
CompositeComponentStackManager.push(jakarta.faces.component.UIComponent).
| Constructor and Description |
|---|
ContextualCompositeValueExpression() |
ContextualCompositeValueExpression(jakarta.faces.view.Location location,
jakarta.el.ValueExpression originalVE) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Class<?> |
getExpectedType() |
String |
getExpressionString() |
jakarta.faces.view.Location |
getLocation() |
Class<?> |
getType(jakarta.el.ELContext elContext) |
Object |
getValue(jakarta.el.ELContext elContext) |
int |
hashCode() |
boolean |
isLiteralText() |
boolean |
isReadOnly(jakarta.el.ELContext elContext) |
void |
setValue(jakarta.el.ELContext elContext,
Object o) |
String |
toString() |
public ContextualCompositeValueExpression()
public ContextualCompositeValueExpression(jakarta.faces.view.Location location,
jakarta.el.ValueExpression originalVE)
public Object getValue(jakarta.el.ELContext elContext)
getValue in class jakarta.el.ValueExpressionpublic void setValue(jakarta.el.ELContext elContext,
Object o)
setValue in class jakarta.el.ValueExpressionpublic boolean isReadOnly(jakarta.el.ELContext elContext)
isReadOnly in class jakarta.el.ValueExpressionpublic Class<?> getType(jakarta.el.ELContext elContext)
getType in class jakarta.el.ValueExpressionpublic Class<?> getExpectedType()
getExpectedType in class jakarta.el.ValueExpressionpublic String getExpressionString()
getExpressionString in class jakarta.el.Expressionpublic boolean equals(Object o)
equals in class jakarta.el.Expressionpublic int hashCode()
hashCode in class jakarta.el.Expressionpublic boolean isLiteralText()
isLiteralText in class jakarta.el.Expressionpublic jakarta.faces.view.Location getLocation()
Location of this ValueExpressionCopyright © 2010–2022 JBoss by Red Hat. All rights reserved.