Overriding System Message handler (not just text)

Hi,

I’m trying to find a way to override the client-side handler for Vaadin’s system notification, or ideally notifications in general. I know you can change the texts themselves by overriding the getSystemMessages() class, but I’m looking to make a few more changes such as:

  • Move the dialog to the middle of the screen
  • Make the error dialog modal (implying I need to create multiple elements).

Is there a way to write a client-side or server-side handler that will override Vaadin’s “display notification” action?

Thanks,
Guypo

On the server side, you cannot affect the notification except by providing HTML content (IIRC), and on the client side, it is currently shown by the private method ApplicationConnection.showError().

You might be able to change its location with CSS (.v-Notification-system), although VNotification.setPosition() might override your settings; not sure if you can also make it effectively modal that way.