Java Code Examples for javax.faces.context.FacesContext.getMessageList()

The following are Jave code examples for showing how to use getMessageList() of the javax.faces.context.FacesContext class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ctsms   File:   Source Code and License Vote up 5 votes
public static List<FacesMessage> getMessageList() {
	FacesContext context = FacesContext.getCurrentInstance();
	if (context != null) {
		return context.getMessageList();
	return new ArrayList<FacesMessage>();
Example 2
Project: admin-template   File:   Source Code and License Vote up 5 votes
 * If there is any faces message queued add PrimeFaces validation failed
 * @param context
private void findErrorMessages(FacesContext context) {
    if (context.getMessageList().isEmpty() || context.isValidationFailed()) {
    for (FacesMessage msg : context.getMessageList()) {
        if (msg.getSeverity().equals(FacesMessage.SEVERITY_ERROR) || msg.getSeverity().equals(FacesMessage.SEVERITY_FATAL)) {