From ed2fb693665af8eb0d45f18ef200da121940ec70 Mon Sep 17 00:00:00 2001 From: Bauke Scholtz Date: Mon, 30 May 2016 15:05:40 +0200 Subject: [PATCH] [JBEAP-10241] When INTERPRET_etc_AS_NULL=true, then a required submitted value, which is afterwards removed and re-submitted, should not reappear. https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-671 (cherry picked from commit 0813ee1fdef418e47ef03ced7d57a1abe4c2bf54) --- .../src/main/java/javax/faces/component/UIInput.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jsf-api/src/main/java/javax/faces/component/UIInput.java b/jsf-api/src/main/java/javax/faces/component/UIInput.java index 8bdcd3aaed..15526219ab 100644 --- a/jsf-api/src/main/java/javax/faces/component/UIInput.java +++ b/jsf-api/src/main/java/javax/faces/component/UIInput.java @@ -43,8 +43,8 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; - import java.util.Map; + import javax.el.ELException; import javax.el.ValueExpression; import javax.faces.FacesException; @@ -259,9 +259,11 @@ public String getFamily() { * its corresponding {@link Renderer}.

*/ public Object getSubmittedValue() { - - return (this.submittedValue); - + if (submittedValue == null && !isValid() && considerEmptyStringNull(FacesContext.getCurrentInstance())) { // JAVASERVERFACES_SPEC_PUBLIC-671 + return ""; + } else { + return submittedValue; + } }