messages - Display Errors

Displays error messages for all controls on a page.


Core Controls


<xp:messages attributes>content</xp:messages>
Table 1. Essential properties
Property Description
id Defaults to message1, message2, and so on.
layout The layout can be as a list (default) or table.
Table 2. All properties
Category Properties
accessibility role, title
basics attrs, binding, dir, globalOnly, id, lang, loaded, rendered, rendererType
format layout, showDetail, showSummary, tooltip
styling disableTheme, errorClass, errorStyle, fatalClass, fatalStyle, infoClass, infoStyle, style, styleClass, themeId, warnClass, warnStyle


By default most validation checks occur on the client before sending a request to the server. If validation fails, the client displays an error message in a dialog and cancels the server request.

If you want validation checks to occur on the server and the error message displayed in this control, you must set disableClientSideValidation to true for the target control.


Here an input box is bound to numeric data and does not validate on the client side. Following is an error display for the input box.
<xp:inputText id="inputText3" value="#{document1.number}"
		<xp:convertNumber type="number"></xp:convertNumber>
<xp:message id="message1" for="inputText3"></xp:message>
If the user enters a non-numeric value in the input box, the following message appears in the error display:
This field is not a valid number