DimControl.DimModel

Syntax

DimModel: PP.Mb.DimSource

Description

The DimModel property determines dictionary model.

Comments

Property value can be set from JSON or using the setSource method, property value is returned by the getSource method.

Example

To execute this example the HTML page must contain the ReportBox component named reportBox. Get instance of control:

// Get instance of PP.Prx.DimControl
DV = reportBox.getDataView();
// -> PP.Prx.Ui.DataArea {}
cBar = DV.getControlBar();
//  ->  PP.Prx.Ui.ControlBar {}
dimC = cBar.getControls()[0];
//  -> PP.Prx.Ui.DimComboControl {}
dControl = dimC.getSource();
// -> PP.Prx.DimControl {}
// Instance of PP.Prx.DimControl is obtained
// Determine whether control contents and structure are changed
console.debug(dControl.getIsContentChanged ? "Dictionary contents is changed" : "Dictionary contents is not changed");
console.debug(dControl.getIsStructureChanged ? "Dictionary structure is changed" : "Dictionary structure is not changed");
// Determine whether multiple selection is available
console.debug(dControl.getMultiSelect ? "Multiple selection is available in a control" : "Multiple selection is not available");
// Determine selection method
console.debug("Selection method in a dimension item: " + dControl.getSelectionMode());
// Get name of the dimension used in the control
console.debug("Dimension name: " + dControl.getDimModel().getName());

After executing the example instance of the DimControl class is obtained, and information about its properties is displayed, and also dimension name is obtained.

See also:

DimControl