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:23:07 UTC
[myfaces] branch 2.3.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.3.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.3.x by this push:
new 61aa829 MYFACES-4333 ElContext#getFunctionMapper returns null
61aa829 is described below
commit 61aa8295d6cb6db69f0477e71763fc5b7c6bda61
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Sat Apr 25 18:22:59 2020 +0200
MYFACES-4333 ElContext#getFunctionMapper returns null
---
.../myfaces/view/facelets/FaceletViewDeclarationLanguage.java | 2 +-
.../apache/myfaces/view/facelets/compiler/NamespaceHandler.java | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index a116671..bc6972e 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -2632,7 +2632,7 @@ public class FaceletViewDeclarationLanguage extends FaceletViewDeclarationLangua
// to be true if 2.0, false otherwise.
partialStateSavingDefault = "2.0".equals(facesVersion) || "2.1".equals(facesVersion) ||
- "2.2".equals(facesVersion) || (facesVersion == null);
+ "2.2".equals(facesVersion) || "2.3".equals(facesVersion) || (facesVersion == null);
// In jsf 2.0 this code evolve as PartialStateSaving feature
//_buildBeforeRestore = _getBooleanParameter(context, PARAM_BUILD_BEFORE_RESTORE, false);
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
{