Search code examples
pentahopentaho-cde

Pentaho cde popup not showing table


I have a Pentaho cde dashboard with a popup component to show a table. This popup works ok if I load the table when the dashboard is generated. However, I want to change the query called depending on which figure is clicked on the main dashboard page. The table consists of detail records retrieved from a database using a cda query.

When I change a parameter containing the dataAccessId when calling the popup it does not work. The popup fails to appear.

Anyone have any ideas how to get around this?

This works:

function f(e){
    render_Popup_Details.popup($(e.target));
} 

This doesn't work:

function f(e){
    Dashboards.fireChange('flag_popup', 'flag_10');
    render_Popup_Details.popup($(e.target));
} 

Solution

  • Did you try updating the table before activating the popup?

    function f(e){
        Dashboards.fireChange('flag_popup', 'flag_10');
    
        Dashboards.update([render_your_table_component_name]);
    
        render_Popup_Details.popup($(e.target));
    }
    

    If you're using RequireJS, then:

    function f(e){
        this.dashboard.setParameter('flag_popup', 'flag_10');
    
        this.dashboard.getComponent('render_your_table_component_name').update();
    
        this.dashboard.getComponent('render_Popup_Details').popup($(e.target));
    }