Is it possible to somehow get the currently shown Notification from a given window in Vaadin? Looking at the Window API, all I can see is a couple of showWindow() methods.
So, does anyone know if there exist some functionality for getting the currently shown Notification (if there is any Notification present, that is)?
I do not believe there is currently any way to do this.
You could override Window#showNotification(Notification) to keep track of this yourself, but as far as I can see, the client doesn’t tell the server that the notification has been closed => there’s no way of “resetting” this flag.
(the private method Window#addNotification keeps track of the notifications to send to the browser in a linked list, but Window#paintContent(PaintTarget) clears that list as soon as they are sent to the browser)