You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/09/15 07:24:20 UTC
[myfaces-tobago] branch master updated: TOBAGO-1801: Tree: when
there is a node with rendered=false the state must not be updated
This is an automated email from the ASF dual-hosted git repository.
lofwyr 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 7b97c1e TOBAGO-1801: Tree: when there is a node with rendered=false the state must not be updated
7b97c1e is described below
commit 7b97c1e9737d87dbef44768fc5112290a6e38882
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Fri Sep 15 09:23:32 2017 +0200
TOBAGO-1801: Tree: when there is a node with rendered=false the state must not be updated
---
.../apache/myfaces/tobago/internal/util/RenderUtils.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/RenderUtils.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/RenderUtils.java
index 4064cdf..a47bf4d 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/RenderUtils.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/RenderUtils.java
@@ -23,6 +23,7 @@ import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
import org.apache.myfaces.tobago.internal.component.AbstractUICommandBase;
import org.apache.myfaces.tobago.internal.component.AbstractUIData;
+import org.apache.myfaces.tobago.internal.component.AbstractUITreeNodeBase;
import org.apache.myfaces.tobago.internal.renderkit.Command;
import org.apache.myfaces.tobago.internal.renderkit.CommandMap;
import org.apache.myfaces.tobago.model.ExpandedState;
@@ -166,6 +167,18 @@ public final class RenderUtils {
break;
}
+ // if the node is not rendered, the state must not be evaluated.
+ boolean skip = false;
+ for (UIComponent uiComponent : data.getChildren()) {
+ if (uiComponent instanceof AbstractUITreeNodeBase && !uiComponent.isRendered()) {
+ skip = true;
+ break;
+ }
+ }
+ if (skip) {
+ continue;
+ }
+
final TreePath path = data.getPath();
// selected
--
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <co...@myfaces.apache.org>'].