Showing pop-ups

Pop-up

Pop-ups are non-intrusive messages that inform the user whether an action was completed or aborted successfully. Typically they confirm something. Pop-ups look like Post-IT notes. They go away automatically and don’t require user action. Use pop-ups to confirm what the user did and provide them with confidence and assurance.

To show pop-ups, inject the UiContext interface to your class. The UiContext is implemented by AppContext, SubAppContext and Shell, so if you have one of those at hand, just reuse them.

Usage examples:

@Inject
public MyCustomClass(UiContext uiContext) {
    this.uiContext = uiContext;
}

// Send an INFO notification to the current user.
private openInfoNotification(String message) {
    uiContext.openNotification(MessageStyleTypeEnum.INFO, true, message);
}

// Send an ERROR notification to the current user.
private openErrorNotification(String message) {
    uiContext.openNotification(MessageStyleTypeEnum.ERROR, true, message);
}
Feedback