EaxDataView.showFault

Syntax

showFault(message);

Parameters

message. Error message displayed in the dialog box.

Description

The showFault method shows a dialog box that contains an error message.

Example

Executing the example requires that the HTML page contains the EaxDataBox component named EaxDataBox (see Example of Creating the EaxDataBox Component). Show a dialog box that contains an error message, if an error occurs because of an invalid sheet name (defined using the PP.Exp.EaxDocument.SheetNameError enumeration):

// Check sheet name
var sheetCheck = EaxDataBox.getSource().checkSheetName("New sheet");
switch (sheetCheck) {
    case PP.Exp.EaxDocument.SheetNameError.Coincident:
        // Output error message
        EaxDataBox.showFault(PP.resourceManager.getString("Content", "EaxSheetNameCoincident"));
        sender.setCaption(PP.String.escapeHTML("Sheet 1"));
        break;
    case PP.Exp.EaxDocument.SheetNameError.Empty:
        // Output error message
        EaxDataBox.showFault(PP.resourceManager.getString("Content", "EaxSheetNameEmpty"));
        sender.setCaption(PP.String.escapeHTML("Sheet 1"));
        break;
    }
}

After executing the example a dialog box with the error message appears if the sheet is named incorrectly.

See also:

EaxDataView