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:30:44 UTC
[myfaces-tobago] branch tobago-3.0.x 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 tobago-3.0.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/tobago-3.0.x by this push:
new 5ec8511 TOBAGO-1801: Tree: when there is a node with rendered=false the state must not be updated
5ec8511 is described below
commit 5ec851123ee8bec99ce2dbf1bbd55e08fdad92f6
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
(cherry picked from commit 7b97c1e)
---
.../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 0227d60..de859bc 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;
@@ -153,6 +154,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>'].