You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2020/04/25 16:22:43 UTC

[myfaces] branch 2.2.x updated: MYFACES-4333 ElContext#getFunctionMapper returns null

This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/2.2.x by this push:
     new 427a27b  MYFACES-4333 ElContext#getFunctionMapper returns null
427a27b is described below

commit 427a27bdbe43bc473990f8513144e0cc70599e6e
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Sat Apr 25 18:22:35 2020 +0200

    MYFACES-4333 ElContext#getFunctionMapper returns null
---
 .../apache/myfaces/view/facelets/compiler/NamespaceHandler.java    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceHandler.java
index 94ee8fb..c86ef65 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceHandler.java
@@ -21,6 +21,7 @@ package org.apache.myfaces.view.facelets.compiler;
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.util.Map;
+import javax.el.ELContext;
 
 import javax.el.ELException;
 import javax.el.FunctionMapper;
@@ -30,6 +31,7 @@ import javax.faces.view.facelets.ComponentHandler;
 import javax.faces.view.facelets.FaceletContext;
 import javax.faces.view.facelets.FaceletException;
 import javax.faces.view.facelets.FaceletHandler;
+import org.apache.myfaces.el.unified.FacesELContext;
 
 import org.apache.myfaces.view.facelets.el.CompositeFunctionMapper;
 import org.apache.myfaces.view.facelets.tag.TagLibrary;
@@ -53,6 +55,11 @@ final class NamespaceHandler extends FunctionMapper implements FaceletHandler
             ELException
     {
         FunctionMapper orig = ctx.getFunctionMapper();
+        ELContext elContext = ctx.getFacesContext().getELContext();
+        if (elContext instanceof FacesELContext)
+        {
+            ((FacesELContext) elContext).setFunctionMapper(this);
+        }
         ctx.setFunctionMapper(new CompositeFunctionMapper(this, orig));
         try
         {