You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2019/08/26 11:31:48 UTC

[myfaces-tobago] branch master updated: TOBAGO-2003 - Tobago: Confirmation facet should not render if isRendered evals to false

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 77df54d  TOBAGO-2003 - Tobago: Confirmation facet should not render if isRendered evals to false
77df54d is described below

commit 77df54d311418b241fb2fb757e77a728e8c5c4e0
Author: Volker Weber <v....@inexso.de>
AuthorDate: Mon Aug 26 13:27:15 2019 +0200

    TOBAGO-2003 - Tobago: Confirmation facet should not render if isRendered evals to false
---
 .../src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
index 7588a8b..1f6dab4 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
@@ -925,10 +925,10 @@ public final class ComponentUtils {
       return confirmation;
     }
     final UIComponent facet = ComponentUtils.getFacet(component, Facets.confirmation);
-    if (facet instanceof ValueHolder) {
+    if (facet instanceof ValueHolder && ((UIComponent) facet).isRendered()) {
       final ValueHolder valueHolder = (ValueHolder) facet;
       return "" + valueHolder.getValue();
-    } else if (facet != null) {
+    } else if (facet != null && !(facet instanceof ValueHolder)) {
       LOG.warn("The content of a confirmation facet must be a ValueHolder. Use e. g. <tc:out>.");
     }
     return null;