Dashboard.fireChange JavaScript error in pentaho CDE

I'm using pentaho CE v7.1, the CDE Dashboard Creator.

I'm capturing a selection on a chart. When I try to set the selected category on a param, I do in the click action javascript:

Dashboards.fireChange('param_ordername', atom2.label);

where:

  • param_ordername is the parameter
  • atom2.label contains the string I want to set to the parameter

In the JavaScript console I can see this error when clicking:

ReferenceError: Dashboards is not defined

I've tried this variant:

 this.dashboard.fireChange('param_ordername', atom2.label);

with the same results.

Any clue of how to set the value to the parameter?

Thanks,

Marta

Answers:

Answer

Does your dashboard have requirejs support?

If so, the Dashboards object doesn’t exist anymore.

You have two options:

  1. Disable requirejs support on the dashboard settings;
  2. Change all references to Dashboards object to this.dashboard (note the spelling differences).
Answer

I don't know why this.dashboard.fireChange() doesn't work, but dashboard.fireChange() works for me with enabled requirejs support (Pentaho CE 7.1)

Answer

With RequireJS, the usage would be:

this.dashboard.setParameter('param_name','param_value');
Answer

you can use Dashboard.setParameter('parameterName','parameterValue') or Dashboard.setParametervalue('parameterName','parameterValue')

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.