To display Fatal Error Message
addFacesMessage(FacesMessage.SEVERITY_FATAL, "User Message");
To display Error Message
addFacesMessage(FacesMessage.SEVERITY_ERROR, "User Message"");
To display Warning Message
addFacesMessage(FacesMessage.SEVERITY_WARN, "User Message"");
// The method that displays the message.
public static void addFacesMessage(FacesMessage.Severity severity, String message) {
FacesMessage fm = new FacesMessage(severity, message, null);
FacesContext.getCurrentInstance().addMessage(null, fm);
}
addFacesMessage(FacesMessage.SEVERITY_FATAL, "User Message");
To display Error Message
addFacesMessage(FacesMessage.SEVERITY_ERROR, "User Message"");
To display Warning Message
addFacesMessage(FacesMessage.SEVERITY_WARN, "User Message"");
To display Info Message
addFacesMessage(FacesMessage.SEVERITY_INFO, "User Message"");
addFacesMessage(FacesMessage.SEVERITY_INFO, "User Message"");
public static void addFacesMessage(FacesMessage.Severity severity, String message) {
FacesMessage fm = new FacesMessage(severity, message, null);
FacesContext.getCurrentInstance().addMessage(null, fm);
}
No comments:
Post a Comment