Method showNotification missing in screen

I have a class which extends Screen (not any Abstract classes).
How can I use in this case showNotification method (because is in red)?
I’ve try with “implements Frame” but doesn’t work because I have to implement all Frame Interface methods.

If you are using CUBA v7+, you need to inject Notifications:

@Inject
private Notifications notifications;

@Subscribe
private void onInit(InitEvent event) {
    notifications.create().withCaption("Good afternoon!").show();
}
3 Likes