Skip to main content
Pentaho Documentation

User Interface APIs

api.ui Class

User interface definition for api class. Contains all UI related API calls.

Methods

disableFilterPanel (removeFlag)

Removes filter panel, filter panel toggle arrow, the filter count, and the filter toggle button on the main tool bar. This API function is additionally available via the URL parameter 'disableFilterPanel'.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the filter functionality. If set to a value of 'true', then the filter panel and all related elements are deleted. If any other value is set, then the filter panel is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the toolbar.

Examples:

api.ui.disableFilterPanel();
http://sample.url.com?disableFilterPanel=true

getMode ( ) String

Returns the mode of the current report's representation.

Returns:

  • String

    Current mode. Possible values are 'EDIT' and 'VIEW'.

Example:

api.ui.getMode();

listGembarIds ( ) Array

Returns an array which contains the IDs of the fields.

Returns:

Example:

api.ui.listGembarIds();

Return Value: ["rows", "columns", "measures"]

listVizIds ( ) Array

Returns an array which contains the IDs of the visualization.

Returns:

  • Array

    The visualization's IDs.

Example:

api.ui.listVizIds();

Return Value: ["pivot", "ccc_bar", "ccc_barstacked", "ccc_barnormalized", "ccc_horzbar", "ccc_horzbarstacked", "ccc_horzbarnormalized", "ccc_pie", "ccc_line", "ccc_area", "ccc_scatter", "ccc_barline", "ccc_heatgrid", "ccc_sunburst", "open_layers"]

removeFieldLayout (removeFlag)

Removes the layout panel and the toolbar's button for opening and closing the panel. This API function is additionally available via the URL parameter 'removeFieldLayout'. This function only works in EDIT mode.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the field layout panel. If set to a value of 'true', then the field layout panel is deleted. If any other value is set, then the field layout panel is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the field layout panel.

Examples:

api.ui.removeFieldLayout();
http://sample.url.com?removeFieldLayout=true

removeFieldList (removeFlag)

Removes field list panel and the toolbar's button for opening and closing the panel. This API function is additionally available via the URL parameter 'removeFieldList'. This function only works in EDIT mode.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the field list. If set to a value of 'true', then the field list is deleted. If any other value is set, then field list is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the field list.

Examples:

api.ui.removeFieldList();
http://sample.url.com?removeFieldList=true

removeHeaderBar (removeFlag)

Removes the header bar, including the filter panel, report title, and spinner loading bar with the Cancel button. In view mode this function will also remove the View Report Format toggle. This API function is additionally available via the URL parameter 'removeHeaderBar'.

Parameters:

  • removeFlag (Boolean | String)

    Determines whether to remove the header bar function. If set to a value of 'true', then the header bar and all related elements are deleted. If any other value is set, then the header bar is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the toolbar.

Example:

api.ui.removeHeaderBar();
http://sample.url.com?removeHeaderBar=true

removeMainToolbar (removeFlag)

Removes the main toolbar panel which contains buttons to control the report. This API function is additionally available via the URL parameter 'removeMainToolbar'. This function only works in EDIT mode.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the toolbar. If set to a value of 'true', then the toolbar is deleted. If any other value is set, then the toolbar is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the toolbar.

Examples:

api.ui.removeMainToolbar();
http://sample.url.com?removeMainToolbar=true 

removeRedoButton (removeFlag)

Removes the Redo button from the main toolbar. This API function is additionally available via the URL parameter 'removeRedoButton'. This function only works in EDIT mode.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the Redo button from the toolbar. If set to a value of 'true', then the button is deleted. If any other value is set, then the button is not deleted and remains in the toolbar. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the button.

Examples:

api.ui.removeRedoButton();
http://sample.url.com?removeRedoButton=true

removeReportActions (removeFlag)

Removes the action button while in view mode. This API function is additionally available via the URL parameter 'removeReportActions'. This function only works in VIEW mode.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the action button. If set to a value of 'true', then the action button is deleted. If any other value is set, then the action button is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the action button.

Examples:

api.ui.removeReportActions();
http://sample.url.com?removeReportActions=true

removeUndoButton (removeFlag)

Removes the Undo button from the main toolbar. This API function is additionally available via the URL parameter 'removeUndoButton'. This function only works in EDIT mode.

Parameter:

  • removeFlag (Boolean | String)

    Determines whether to remove the Undo button from the toolbar. If set to a value of 'true', then the button is deleted. If any other value is set, then the button is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the button.

Examples:

api.ui.removeUndoButton();
http://sample.url.com?removeUndoButton=true

setFieldListView (view)

Sorts the data source fields based on the view. This API function is additionally available via the URL parameter 'fieldListView'. This function only works in EDIT mode.

Parameter:

  • view (String)

    The value upon which the field list will be sorted. Acceptable values include:

    • CATEGORY
    • SCHEMA
    • TYPE
    • NAME

Examples:

api.ui.setFieldListView("CATEGORY")
http://sample.url.com?fieldListView=CATEGORY

showFieldLayout (makeVisible)

Enables the user to toggle whether the field layout panel is visible. This api function is additionally available via the URL parameter 'showFieldLayout'. This function only works in EDIT mode.

Parameters:

  • makeVisible (Boolean | String)

    Determines whether the field layout is shown.

Example:

api.ui.showFieldLayout("true");
http://sample.url.com?showFieldLayout=true

showFieldList (makeVisible)

Enables the user to toggle whether the field list panel is visible. This API function is additionally available via the URL parameter 'showFieldList'. This function only works in EDIT mode.

Parameter:

  • makeVisible (Boolean | String)

    Determines whether the field list is shown.

Examples:

api.ui.showFieldList("true");
http://sample.url.com?showFieldList=true

showFilterPanel (makeVisible)

Enables the user to toggle whether the filter panel is visible or hidden.  This API function is additionally available via the URL parameter 'showFilterPanel'

Parameter:

  • makeVisible (Boolean | String)

    Determines whether the filter panel is shown.

Examples:

api.ui.showFilterPanel("true");
http://sample.url.com?showFilterPanel=true

showRepositoryButtons (makeVisible)

Enables the user to toggle whether the repository buttons in the main toolbar are visible. This API function is additionally available via the URL parameter 'showRepositoryButtons'. This function only works in EDIT mode.

Parameter:

  • makeVisible (Boolean | String)

    Determines whether the repository buttons are shown.

Examples:

api.ui.showRepositoryButtons("true");
http://sample.url.com?showRepositoryButtons=true