Top Description Constructors Methods
com.sun.faces.el

public Class ChainAwareVariableResolver

extends VariableResolver
Class Inheritance
Annotations
@SuppressWarnings:deprecation
Imports
javax.el.ELResolver, .ValueExpression, javax.faces.context.FacesContext, javax.faces.el.EvaluationException, .VariableResolver, com.sun.faces.util.RequestStateManager, com.sun.faces.el.FacesCompositeELResolver.ELResolverChainType

Deprecated

as a consequence of VariableResolver being deprecated. See corresponding docs for further information.

This special VariableResolver serves as the "original" VariableResolver that is passed to the one-arg ctor for the first custom VariableResolver that is encountered during application configuration. Subsequent VariableResolver instances get passed the previous VariableResolver instance, per section 10.4.5 of the spec.

The "specialness" of this VariableResolver is found in its resolveVariable method, which delegates to the head of the "correct" ELResolver chain based on the context in which this expression is being evaluated. If the expression being evaluated originated in a JSP page, the Application's ExpressionFactory is used to create a ValueExpression, which is then evaluated to resolve the variable. This will cause the ELResolver chain described in section 5.6.1 of the spec to be used. If the expression being evaluated originated in a programmatic API call, the Application's ELResolver is used to resolve the variable. This will cause the ELResolver chain described in section 5.6.2 of the spec to be used.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
resolveVariable(FacesContext
FacesContext against which to resolve this variable name
context
,
String
Name of the variable to be resolved
name
)

Implements abstract javax.faces.el.VariableResolver.resolveVariable.

See the class javadocs.

Constructor Detail

ChainAwareVariableResolverback to summary
public ChainAwareVariableResolver()

Method Detail

resolveVariableback to summary
public Object resolveVariable(FacesContext context, String name) throws EvaluationException

Implements abstract javax.faces.el.VariableResolver.resolveVariable.

See the class javadocs.

Parameters
context:FacesContext

Doc from javax.faces.el.VariableResolver.resolveVariable.

FacesContext against which to resolve this variable name

name:String

Doc from javax.faces.el.VariableResolver.resolveVariable.

Name of the variable to be resolved

Returns:Object

Doc from javax.faces.el.VariableResolver.resolveVariable.

the result of the resolution

Annotations
@Override
Exceptions
EvaluationException:

Doc from javax.faces.el.VariableResolver.resolveVariable.

if an exception is thrown while resolving the variable name (the thrown exception must be included as the cause property of this exception)