RevisionComparisonWizard Constructor

Syntax

PP.TS.Ui.RevisionComparisonWizard(settings: Object);

Parameters

settings. JSON object that contains values of class properties.

Description

The RevisionComparisonWizard constructor creates an instance of the RevisionComparisonWizard class.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Create a data validation wizard that compares data versions and place it in a dialog.

// Get the Data workbook tool ribbon tab
var dataCategory = workbookBox.getRibbonView().getDataCategory();
// Determine callback function
var onRequestMetadata = function (sender, args) {
    console.log("Request metadata...");
    dataCategory.RequestMetadata.fire(dataCategory, args);
};
// Create a wizard for data validation by comparing their versions
var revisionComparsionWizard = new PP.TS.Ui.RevisionComparisonWizard({
        RequestMetadata: new PP.Delegate(this.onRequestMetadata, dataCategory)
    });
// Get DOM tree for this wizard
var dom = revisionComparsionWizard.getDomNode();
// Set wizard style
PP.addClass(dom, "PPValidationSettingsDlgContent");
// Add the wizard to the standard dialog
var dialog = new PP.Ui.Dialog({
        // Specify resource key for displaying dialog title
        ResourceKey: "TSRibbonVersionDataComparisonDialog",
        Content: revisionComparsionWizard,
        Width: 734, // Dialog width
        Height: 184 // Dialog height		
    });
// Display the dialog
dialog.show();

After executing the example the data validation wizard that compares data versions is created and placed in a dialog:

The RequestMetadata event is fired on component creation, and the browser console displays an appropriate notice on processing this event:

Request metadata...

See also:

RevisionComparisonWizard