Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Fixed issue #212 #228

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.Serializable;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
Expand All @@ -20,6 +21,7 @@
import org.olap4j.metadata.Hierarchy;
import org.olap4j.metadata.Member;
import org.olap4j.metadata.MetadataElement;
import org.olap4j.metadata.NamedList;
import org.pivot4j.PivotModel;
import org.pivot4j.analytics.component.tree.DefaultTreeNode;
import org.pivot4j.analytics.component.tree.NodeFilter;
Expand Down Expand Up @@ -416,10 +418,13 @@ public void moveDown() {

public Hierarchy getHierarchy() {
if (hierarchy == null && hierarchyName != null && model.isInitialized()) {
this.hierarchy = model.getCube().getHierarchies()
.get(hierarchyName);
for (Hierarchy h : model.getCube().getHierarchies()) {
if (h.getUniqueName().equals(hierarchyName)) {
this.hierarchy = h;
}
}
}

return hierarchy;
}

Expand Down
2 changes: 1 addition & 1 deletion pivot4j-analytics/src/main/webapp/view.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
action="#{memberSelectionHandler.show}" update=":hierarchy-form"
oncomplete="PF('hierarchyConfig').show();"
title="#{msg['button.hierarchyConfig.tooltip']}">
<f:param name="hierarchy" value="#{node.name}" />
<f:param name="hierarchy" value="#{node.uniqueName}" />
</p:commandButton>
<!-- workaround for PrimeFaces issue #4748 -->
<p:draggable for="hierarchy-node"
Expand Down
8 changes: 4 additions & 4 deletions pivot4j-core/src/main/java/org/pivot4j/impl/Quax.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ public void setHierarchies(List<Hierarchy> hierarchies) {
hierarchyMap.clear();

for (Hierarchy hierarchy : hierarchies) {
hiers.add(hierarchy.getName());
hierarchyMap.put(hierarchy.getName(), hierarchy);
hiers.add(hierarchy.getUniqueName());
hierarchyMap.put(hierarchy.getUniqueName(), hierarchy);
}
}

Expand Down Expand Up @@ -557,8 +557,8 @@ public void regeneratePosTree(List<Exp> sets, boolean hiersChanged) {
for (Exp set : sets) {
try {
Hierarchy hierarchy = quaxUtil.hierForExp(set);
hiers.add(hierarchy.getName());
hierarchyMap.put(hierarchy.getName(), hierarchy);
hiers.add(hierarchy.getUniqueName());
hierarchyMap.put(hierarchy.getUniqueName(), hierarchy);
} catch (UnknownExpressionException e) {
throw new PivotException("Unknown expression : "
+ e.getExpression());
Expand Down