private boolean isNotified(String notif) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Page current = Page.getCurrent(); Field f = current.getClass().getDeclaredField("notifications"); f.setAccessible(true); List<Notification> notifications = (List<Notification>) f.get(current); boolean found = false; if (notifications != null) { for (Notification notification : notifications) { if (notification.getCaption() == notif) { found=true; } } } return found; }