Customizing System Messages-Vaadin Applications
System Messages are notifications that indicate a certain invalid state of the application.Generally when this notification pop up the application is restarted.Example of that state is when the application session has expired.There application instructs the user to restart the application again.
How are System Messages Managed?
System Messages are managed by class called SystemMessage class.
Below are example of System Messages that are contained in System Class.
If there are no requests that have been made to the application for a specified time which is set in web.xml file,the application session automatically timeouts.
Caused by problem with communication between client side communication and application server side problem.
This error occurs when unauthorized response (401) from the server is occurs
This error is as a result of internal problem possibly in Vaadin Client Side Engine or custom client code.
This error is as a result of client side state being invalid with respect to server side state.
This error notifies the user that cookies have been disabled and the application cannot work without having them enabled.
All these messages have four parts,i.e Short caption,actual message,url redirect after message has been displayed, and a property that indicates if the notification is enabled.
System messages can be overriden by getSystemMessages() method.
Handling Uncaught Exceptions
Vaadin applications are event driven.They rely on events triggered by user using mouse or keyboard.When handling events,errors can result which my halt the application and cause it to stop running.For example below codes throws exception that is not caught.
Below is the result of running above Application