To output information both to the model developer and user, the causeType must be stated accordingly:
CauseType.LIBRARY: Appears in the console and in the Message log view.
CauseType.PROJECT: Appears in the console and in the Message log view. Similarly, a message window is displayed that contains the message text as Form-UI.
Groovy:
import org.foederal.util.ui.messages.UserMessageCollector;
[...]
if (selectedObject == null)
{
UserMessageCollector.addError(PROJECT, self, null, "Delete Operation", "Delete failed. No item was selected.");
return;
}
try
{
[... Delete operation ...]
UserMessageCollector.addInfo(PROJECT, self, null, "Delete Operation" ,"Delete succeeded.");
}
catch ( Exception e )
{
UserMessageCollector.addError(LIBRARY, self, null, "Delete Operation",
"Delete failed: "+e.getMessage(), e);
UserMessageCollector.addError(PROJECT, self, null, "Delete Operation",
"Delete failed. Please contact your library administrator.", null);
}