myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McMahan (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (MYFACES-1579) VariableResolver throws IllegalStateException because scope is unknown
Date Thu, 29 Mar 2007 03:16:25 GMT
VariableResolver throws IllegalStateException because scope is unknown
----------------------------------------------------------------------

                 Key: MYFACES-1579
                 URL: https://issues.apache.org/jira/browse/MYFACES-1579
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-252
    Affects Versions: 1.2.0-SNAPSHOT
            Reporter: Paul McMahan


VariableResolverImpl tries to determine if it was invoked through the faces chain or jsp chain
by looking for an attribute (Scope.getClassName()) in the RequestMap.  However, that attribute
is only set during the span of a call to FacesCompositeELResolver.getValue().   See FacesCompositeELResolver#invoke(),
which calls setScope() and then unsetScope().

Therefore the following code always throws IllegalStateException 

        VariableResolver resolver = application.getVariableResolver();
        Object result = resolver.resolveVariable(facesContext, "param");

because when VariableResolverImpl.resolveVariable() looks for the scope in the request map
(which happens outside the getValue() call) its always null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message