Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1579

VariableResolver throws IllegalStateException because scope is unknown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0
    • 1.2.0
    • JSR-252
    • None

    Description

      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.

      Attachments

        1. MYFACES-1579.patch
          2 kB
          Paul Franklin McMahan

        Activity

          People

            mbroekelmann Mathias Broekelmann
            pmcmahan Paul Franklin McMahan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: