The Messages component displays error messages generated by the code during execution. This is the primary way to tell users that something has gone wrong. The placement of this component shows where in the UI the messages should appear. However, if there is more than one Messages component they all show the same list of messages.
Parameters
none
Static Methods
- Messages.error(msg:string) – this will post the string msg as an error.
- Messages.inform(msg:string) – this will post the string msg as an information item.
- Messages.clear() – this will clear out the list of messages.
- Messages.hasMessages():boolean – returns true if there are any posted messages.
Examples
Messages.error("Don't do that again");
Styling
- Messages – the default styling for the message display block.
- MessageError – the default styling for error messages.
- MessageInform – the default styling for information messages.