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 2018/03/28 13:21:02 UTC
[myfaces-tobago] branch master updated: TOBAGO-1883: is
not applied to in some cases
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 d75fa95 TOBAGO-1883: <tc:style> is not applied to <tc:tree> in some cases
d75fa95 is described below
commit d75fa956ed0ae0d6cae67abb3062ec25f56f4576
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Mar 28 15:22:08 2018 +0200
TOBAGO-1883: <tc:style> is not applied to <tc:tree> in some cases
this also fixes: TOBAGO-1878: Duplicated IDs in HTML for tc:tree inside tc:flexLayout with mojarra
---
.../tobago/internal/renderkit/renderer/TreeRenderer.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TreeRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TreeRenderer.java
index 6d5a0cd..fe26224 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TreeRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TreeRenderer.java
@@ -22,6 +22,7 @@ package org.apache.myfaces.tobago.internal.renderkit.renderer;
import org.apache.myfaces.tobago.component.UITreeNode;
import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.internal.component.AbstractUIData;
+import org.apache.myfaces.tobago.internal.component.AbstractUIStyle;
import org.apache.myfaces.tobago.internal.component.AbstractUITree;
import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.internal.util.JsonUtils;
@@ -68,8 +69,13 @@ public class TreeRenderer extends RendererBase {
}
@Override
- public void encodeChildren(final FacesContext context, final UIComponent component) throws IOException {
- // will be rendered in encodeEnd()
+ public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final AbstractUITree tree = (AbstractUITree) component;
+ for (final UIComponent child : tree.getChildren()) {
+ if (child instanceof AbstractUIStyle) {
+ child.encodeAll(facesContext);
+ }
+ }
}
@Override
@@ -127,7 +133,11 @@ public class TreeRenderer extends RendererBase {
}
for (final UIComponent child : tree.getChildren()) {
- child.encodeAll(facesContext);
+ if (child instanceof AbstractUIStyle) {
+ // ignore, this is rendered in encodeChildren()
+ } else {
+ child.encodeAll(facesContext);
+ }
}
}
tree.setRowIndex(-1);
--
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.