diff --git a/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java b/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java index 4a50abfa..446528a9 100644 --- a/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java +++ b/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java @@ -248,7 +248,9 @@ void addMemberProperties() { List> children = null; - if (getMember() != null) { + // Should render level properties only once behind the latest + if (getMember() != null && isLastInLevel()) { + List levels = getReference().getLevels(getHierarchy()); boolean showParent = getReference().getRenderer().getShowParentMembers(); @@ -315,6 +317,18 @@ void addMemberProperties() { } } + private boolean isLastInLevel() { + if (getChildCount() == 0) { + return true; + } + + TableHeaderNode childNode = (TableHeaderNode) getChildren().get(0); + if (getMember().getLevel().getDepth() == childNode.getMember().getLevel().getDepth()) { + return !OlapUtils.equals(getHierarchy(), childNode.getHierarchy()); + } + return true; + } + void mergeChildren() { List> children = new ArrayList>(getChildren());