Search code examples
javascriptpentahopentaho-cde

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


Solution

  • 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).