Notifications Methods in Vaadin Applications
Notifications are error boxes that appear generally at the center of the screen.These Boxes start for some time then they disappear whereas others need the user to click them in order for them to disappear.
These boxes they always have a caption and a message that is optional i.e can be added or not added.Positioning these notifications is always relative to the whole browser.
Notifications Example Code
As you can see above,The caption and description messages appear on the same line.They can be separated by using XHTML <br/> line break mark.Example
Types of Notifications Messages
There are several Notifications that are defined in Window.Notification class.Below is a list of notifications defined.
This message is user friendly.Its not annoying.It disappears automatically without requiring user to click it.The message appears at the center of the screen and its gray in color.
Warning message displays for 1.5 seconds.If the user clicks before the time it will disappear.Its not distractive message.Just neutral.See below caption of Warning message
Error message requires alot of user attention.Its colors indicates.To dismiss the message you have to click it.`User cannot continue interacting with the application unless the error message disappears.
These messages are displayed in the lower right corner of the browser.They are displayed longer than humanized message for at least 3 seconds.User can continue to interact with the application without having to deal with the tray message.
All these features can be controlled by Window.Notification .See below code