myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: MYFACES-4333 ElContext#getFunctionMapper returns null
Date Sat, 25 Apr 2020 16:24:50 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 86d4d86  MYFACES-4333 ElContext#getFunctionMapper returns null
86d4d86 is described below

commit 86d4d867bee804fd415232cdd6c1a2c626e0c3f3
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Sat Apr 25 18:24:43 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 a7d1db9..d2ea616 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.FacesELContext;
 
 import org.apache.myfaces.view.facelets.el.CompositeFunctionMapper;
 import org.apache.myfaces.view.facelets.tag.TagLibrary;
@@ -54,6 +56,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
         {


Mime
View raw message