You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Paul Nicolucci (Jira)" <de...@myfaces.apache.org> on 2023/01/17 16:01:00 UTC

[jira] [Created] (MYFACES-4547) FacesContext.getCurrentInstance().getELContext().getVariableMapper() returns null

Paul Nicolucci created MYFACES-4547:
---------------------------------------

             Summary: FacesContext.getCurrentInstance().getELContext().getVariableMapper() returns null
                 Key: MYFACES-4547
                 URL: https://issues.apache.org/jira/browse/MYFACES-4547
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 4.0.0-RC3, 3.0.2, 2.3-next-M7, 2.3.10
            Reporter: Paul Nicolucci


The [FacesELContext|https://github.com/apache/myfaces/blob/main/impl/src/main/java/org/apache/myfaces/el/FacesELContext.java] does not have a VariableMapper set.

I see a [DefaultVariableMapper|https://github.com/apache/myfaces/blob/2.2.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultVariableMapper.java] is created in [DefaultFaceletContext|https://github.com/apache/myfaces/blob/2.2.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFaceletContext.java#L165].

This can be solved by doing the following:
1) When getVariableMapper is called on FacesELContext, if the _variableMapper is null create a DefaultVariableMapper at that point.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)