com.sun.faces.el
Class ChainAwareVariableResolver

java.lang.Object
  extended by javax.faces.el.VariableResolver
      extended by com.sun.faces.el.ChainAwareVariableResolver

public class ChainAwareVariableResolver
extends javax.faces.el.VariableResolver

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(javax.faces.context.FacesContext, java.lang.String) 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
ChainAwareVariableResolver()
           
 
Method Summary
 java.lang.Object resolveVariable(javax.faces.context.FacesContext context, java.lang.String name)
          See the class javadocs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainAwareVariableResolver

public ChainAwareVariableResolver()
Method Detail

resolveVariable

public java.lang.Object resolveVariable(javax.faces.context.FacesContext context,
                                        java.lang.String name)
                                 throws javax.faces.el.EvaluationException
See the class javadocs.

Specified by:
resolveVariable in class javax.faces.el.VariableResolver
Throws:
javax.faces.el.EvaluationException


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.