- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Handle Error Messages
You can implement code to manage error messages for custom code. This article gives you information about how.
Clear Error messages
To clear a users' error messages, you use the following code:
processData.getDialogWorkspace().getErrorService().clearAllErrors(processData.getDialogWorkspace().getName());
Message with requirement to confirm by checkbox
To require the user to confirm the message (by checking the checkbox), code something like this:
// Check that all dialogs are closed
if (sessionWorkspace.getNavigator().getActiveWorkspaces().size() > 1) {
ApplicationError error = new ApplicationError("CABASE", "this.action.will.close.all.active.tasks");
error.setKey(dialogWorkspace.getName());
error.setConfirmationKey("this.action.will.close.all.active.tasks");
if (!errorService.addError(error)) {
processData.setAbort(true);
return false;
} else {
errorService.clearAllErrors(dialogWorkspace.getName());
}
}
Was this article helpful?