Skip to content

Commit

Permalink
Corrects Issue mysticfall#212
Browse files Browse the repository at this point in the history
Addresses and corrects problems reported on Issue mysticfall#212
  • Loading branch information
vgartner committed Jun 28, 2017
1 parent d9e4a4d commit b2193ed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
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,9 +418,15 @@ 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.getCaption().equals(hierarchyName))
{
this.hierarchy = h;
}
}
}
// this.hierarchy = model.getCube().getHierarchies()
// .get(hierarchyName);

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.caption}" />
</p:commandButton>
<!-- workaround for PrimeFaces issue #4748 -->
<p:draggable for="hierarchy-node"
Expand Down
4 changes: 2 additions & 2 deletions pivot4j-core/src/main/java/org/pivot4j/impl/Quax.java
Original file line number Diff line number Diff line change
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

0 comments on commit b2193ed

Please sign in to comment.