Tobago Demo

Menu

Messages

Messages are displayed via <tc:messages/> tag.

Tag Library Documentation

Show Messages in different style

Create a message

To create messages, press one of the buttons. The message will be displayed in the tab group below.

Hint If you are using AJAX, make sure to udpate the <tc:message/> tag.

On this tab, you can see how messages are displayed if no attribute are set for the <tc:messages/> tag.

A limit for the number of messages can be set with the maxNumber attribute.

<tc:messages maxNumber="2"/>

The range, which severities are displayed, can be set with minSeverity and maxSeverity. In this example, only warnings and error should be displayed.

<tc:messages minSeverity="WARN" maxSeverity="ERROR"/>

A message can also contain 'details', you can show it with showDetail.

<tc:messages showDetail="true"/>

In this example, only the details are shown. To hide the summary, use showSummary.

<tc:messages showSummary="false" showDetail="true"/>

severity

By default, messages are sorted by severity. Therefor, the orderBy attribute is not needed in this case.

<tc:messages orderBy="severity"/>

occurrence

Messages displayed in the order they occurred.

<tc:messages orderBy="occurrence"/>
© 2005-2023 Apache Software Foundation, Licensed under the Apache License, Version 2.0.