PP.Rds.Ui.CleanUpDialog(settings: Object);
settings. Class settings.
The CleanUpDialog constructor creates a dialog box for clearing MDM dictionary.
To execute this example, the page must contain the DictionaryBox component named dictionaryBox (see Example of creating the DictionaryBox component ). Create a dialog box that clears MDM dictionary, process the CleanCanceled and CleanConfirmed events:
// Create a dialog box for dictionary clearing var cleanUpDialog = new PP.Rds.Ui.CleanUpDialog({ Source: dictionaryBox.getSource()[0], ImagePath: PP.ImagePath, CleanCanceled: function (sender, args) { // Delete this dialog box sender.dispose(); }, CleanConfirmed: function (sender, args) { // Get the dictionary element tree var tree = dictionaryBox.getDataArea().getActiveDictTree(); if (tree) { // Clear the tree tree.cleanUpDict(args.Params); // Delete this dialog box sender.dispose(); } } }); // Show this dialog box cleanUpDialog.showDialog();
A dialog box for clearing MDM dictionary is created after the example execution:
After clicking the Clear button on firing the handler for the CleanConfirmed event, all elements of the MDM dictionary tree are removed, except the root element named Time units:
Clicking the Cancel button fires the CleanCanceled event, and handler of this event removes the dialog box.
See also: