Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8652

Re: DS SDK : Expand hierarchy in visualization

$
0
0

Hi Manfred,

 

Thanks to your excellent example I am now closer than ever!

 

I managed to incorporate the relevant parts from your project, but I'm failing to send the expandNode/collapseNode commands on click. I have confirmed that:

 

1. this.selectedNode is populated correctly (I used getSelectedNodeKey() in a text box successfully)

2. The onHCollapse/onHExpand events are firing properly (my exception has to do with the script contribution

 

When I click in the visualization, I get an exception:

 

Couldn't resolve reference to Member 'collapseHierarchyNode'.

in script

DENDOGRAM_1.collapseHierarchyNode();

 

My script contribution looks like this:

 

/* Collapse the hierarchy */

  @Visibility(private)

  void collapseHierarchyNode() {*

  this.getDataSource().collapseNode(this.getDataSource().getDimensions()[0].name, this.getSelectedNodeKey());

  *}

 

I did this following the example in the 1.4 SDK guide on P 33-34 where it explains using a default ScriptText in your contribution.xml like this:

 

<defaultValue property="onHCollapse">this.collapseHierarchyNode();</defaultValue>

 

This fires the script but obviously there is something wrong with the one I'm trying to use.

 

I created a new branch (script_contribution) on GitHub: jmsrpp/DesignStudio at script_contribution · GitHub

 

In the meantime, I'd like to leverage your solution with the explicit ScriptText for onHExpand and onHCollapse. I couldn't figure out the syntax I needed to use in Design Studio. For my test the BIAL would look like:

 

DS_1.expandNode("SBOP2_D05", "HIERARCHY_NODE/0HIER_NODE/KIDS_CARS");

 

But obviously I want dimension to be populated with dimHierarchy and I want the node to be populated with selectedNode. What format should I use in the script to take advantage of these variables?

 

Thanks again!

 

Jim


Viewing all articles
Browse latest Browse all 8652

Trending Articles