FacesMessages Basics

In your XHTML Page:


	
	Name: 
	

In your backing bean:

// to show up where globalOnly messages appear
facesMessages.add("Changes were not applied...");

// do your field-level validation
facesMessages.addToControl("name", "Name was not valid.");

Results:
Picture 2.png

Update your CSS to fit your style preferences.

Published
Categorized as Uncategorized Tagged