Skip to main content
Pentaho Documentation

User Interface APIs

cv.api. ui

Constructor

Name Description
new ui()

UI definition for cv.api class.

Methods

Name Description
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'.

getMode() : string

Returns the mode of the current report's representation.

listGembarIds() : Array

Returns an array which contains the IDs of the fields.

listVizIds() : Array

Returns an array which contains the IDs of the visualization types.

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.

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.

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'.

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.

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.

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.

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.

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.

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.

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.

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'

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.

Constructor Details

new ui()

UI definition for cv.api class.

Source: javascript/scripts/cv_api_ui.js, line 34

Methods Details

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'.

Source: javascript/scripts/cv_api_ui.js, line 302

Parameters:
Name Default Value Summary
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.

Example

cv.api.ui.disableFilterPanel();

 http://sample.url.com?disableFilterPanel=true
getMode() : string

Returns the mode of the current report's representation.

Source: javascript/scripts/cv_api_ui.js, line 107

Returns:
Name Description
string

current mode. Possible values are "EDIT" or "VIEW".

Example

cv.api.ui.getMode();
listGembarIds() : Array

Returns an array which contains the IDs of the fields.

Source: javascript/scripts/cv_api_ui.js, line 219

Returns:
Name Description
Array

The field's IDs.

Example

cv.api.ui.listGembarIds();

 // Return Value: ["rows", "columns", "measures"]
listVizIds() : Array

Returns an array which contains the IDs of the visualization types.

Source: javascript/scripts/cv_api_ui.js, line 188

Returns:
Name Description
Array

The visualization types' IDs.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 359

Parameters:
Name Default Value Summary
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 field layout is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the toolbar.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 243

Parameters:
Name Default Value Summary
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 field list is not deleted. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the toolbar.

Example

cv.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'.

Source: javascript/scripts/cv_api_ui.js, line 269

Parameters:
Name Default Value Summary
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

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 418

Parameters:
Name Default Value Summary
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.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 392

Parameters:
Name Default Value Summary
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. The parameter 'removeFlag' is not a required parameter. By default, the function always removes the button.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 514

Parameters:
Name Default Value Summary
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.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 333

Parameters:
Name Default Value Summary
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.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 443

Parameters:
Name Default Value Summary
view : string

The value upon which the field list will be sorted. Acceptable values include: CATEGORY,SCHEMA,TYPE,NAME

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 127

Parameters:
Name Default Value Summary
makeVisible : boolean | string

Determines whether the field layout is shown.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 545

Parameters:
Name Default Value Summary
makeVisible : boolean | string

Determines whether the field list is shown.

Example

cv.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'

Source: javascript/scripts/cv_api_ui.js, line 158

Parameters:
Name Default Value Summary
makeVisible : boolean | string

Determines whether the filter panel is shown.

Example

cv.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.

Source: javascript/scripts/cv_api_ui.js, line 481

Parameters:
Name Default Value Summary
makeVisible : boolean | string

Determines whether the repository buttons is shown.

Example

cv.api.ui.showRepositoryButtons("true");

 http://sample.url.com?showRepositoryButtons=true