added validationFailed support
This commit is contained in:
@ -26,313 +26,304 @@ import javax.faces.context.FacesContext;
|
|||||||
*/
|
*/
|
||||||
public abstract class FacesUtil {
|
public abstract class FacesUtil {
|
||||||
|
|
||||||
private FacesUtil() {
|
private FacesUtil() {
|
||||||
// hide constructor of abstract class
|
// hide constructor of abstract class
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns true, if the current request is in the request phase. False
|
* returns true, if the current request is in the request phase. False otherwise.
|
||||||
* otherwise.
|
*
|
||||||
*
|
* @return true, if the current request is in the request phase. False otherwise.
|
||||||
* @return true, if the current request is in the request phase. False
|
*/
|
||||||
* otherwise.
|
public static boolean isRenderRequest() {
|
||||||
*/
|
return !FacesContext.getCurrentInstance().getRenderResponse();
|
||||||
public static boolean isRenderRequest() {
|
}
|
||||||
return !FacesContext.getCurrentInstance().getRenderResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns true, if the current request is in the response phase. True
|
* returns true, if the current request is in the response phase. True otherwise.
|
||||||
* otherwise.
|
*
|
||||||
*
|
* @return true, if the current request is in the response phase. True otherwise.
|
||||||
* @return true, if the current request is in the response phase. True
|
*/
|
||||||
* otherwise.
|
public static boolean isRenderResponse() {
|
||||||
*/
|
return FacesContext.getCurrentInstance().getRenderResponse();
|
||||||
public static boolean isRenderResponse() {
|
}
|
||||||
return FacesContext.getCurrentInstance().getRenderResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the "messages" object
|
* Adds the given message to the "messages" object
|
||||||
*
|
*
|
||||||
* @param message the message to display
|
* @param message the message to display
|
||||||
* @deprecated use addMessage(clientId, message) or
|
* @deprecated use addMessage(clientId, message) or addGlobalMessage(message) instead
|
||||||
* addGlobalMessage(message) instead
|
*/
|
||||||
*/
|
@Deprecated
|
||||||
@Deprecated
|
public static void addMessage(FacesMessage message) {
|
||||||
public static void addMessage(FacesMessage message) {
|
FacesContext.getCurrentInstance().addMessage("messages", message);
|
||||||
FacesContext.getCurrentInstance().addMessage("messages", message);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with the id specified by clientId.
|
* Adds the given message to the object with the id specified by clientId.
|
||||||
*
|
*
|
||||||
* @param clientId the id of the object to bind the message to.
|
* @param clientId the id of the object to bind the message to.
|
||||||
* @param message the message to display
|
* @param message the message to display
|
||||||
*/
|
*/
|
||||||
public static void addMessage(String clientId, FacesMessage message) {
|
public static void addMessage(String clientId, FacesMessage message) {
|
||||||
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message.
|
* Adds the given message as global message.
|
||||||
*
|
*
|
||||||
* @param message the message to display
|
* @param message the message to display
|
||||||
*/
|
*/
|
||||||
public static void addGlobalMessage(FacesMessage message) {
|
public static void addGlobalMessage(FacesMessage message) {
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Information".
|
* Adds the given message as global message with severity "Information".
|
||||||
*
|
*
|
||||||
* @param summary the message to add
|
* @param summary the message to add
|
||||||
*/
|
*/
|
||||||
public static void addGlobalInfoMessage(String summary) {
|
public static void addGlobalInfoMessage(String summary) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, null);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, null);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Information".
|
* Adds the given message as global message with severity "Information".
|
||||||
*
|
*
|
||||||
* @param summary the summary message to display
|
* @param summary the summary message to display
|
||||||
* @param detail the detailed message to display
|
* @param detail the detailed message to display
|
||||||
*/
|
*/
|
||||||
public static void addGlobalInfoMessage(String summary, String detail) {
|
public static void addGlobalInfoMessage(String summary, String detail) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Warning".
|
* Adds the given message as global message with severity "Warning".
|
||||||
*
|
*
|
||||||
* @param summary the summary message to display
|
* @param summary the summary message to display
|
||||||
*/
|
*/
|
||||||
public static void addGlobalWarningMessage(String summary) {
|
public static void addGlobalWarningMessage(String summary) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, null);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, null);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Warning".
|
* Adds the given message as global message with severity "Warning".
|
||||||
*
|
*
|
||||||
* @param summary the summary message to display
|
* @param summary the summary message to display
|
||||||
* @param detail the detailed message to display
|
* @param detail the detailed message to display
|
||||||
*/
|
*/
|
||||||
public static void addGlobalWarningMessage(String summary, String detail) {
|
public static void addGlobalWarningMessage(String summary, String detail) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Error".
|
* Adds the given message as global message with severity "Error".
|
||||||
*
|
*
|
||||||
* @param summary the message to display
|
* @param summary the message to display
|
||||||
*/
|
*/
|
||||||
public static void addGlobalErrorMessage(String summary) {
|
public static void addGlobalErrorMessage(String summary) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, null);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, null);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Error".
|
* Adds the given message as global message with severity "Error".
|
||||||
*
|
*
|
||||||
* @param summary the summary message to display
|
* @param summary the summary message to display
|
||||||
* @param detail the detailed message to display
|
* @param detail the detailed message to display
|
||||||
*/
|
*/
|
||||||
public static void addGlobalErrorMessage(String summary, String detail) {
|
public static void addGlobalErrorMessage(String summary, String detail) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, detail);
|
addGlobalErrorMessage(summary, detail, false);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Fatal".
|
* Adds the given message as global message with severity "Error".
|
||||||
*
|
*
|
||||||
* @param summary the message to display
|
* @param summary the summary message to display
|
||||||
*/
|
* @param detail the detailed message to display
|
||||||
public static void addGlobalFatalMessage(String summary) {
|
* @param valiationFailed if set to true, the method calls currentInstance().validationFailed() to invalidate the current request.
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, null);
|
*/
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
public static void addGlobalErrorMessage(String summary, String detail, boolean valiationFailed) {
|
||||||
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, detail);
|
||||||
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
|
if (valiationFailed) {
|
||||||
|
FacesContext.getCurrentInstance().validationFailed();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message as global message with severity "Fatal".
|
* Adds the given message as global message with severity "Fatal".
|
||||||
*
|
*
|
||||||
* @param summary the summary message to display
|
* @param summary the message to display
|
||||||
* @param detail the detailed message to display
|
*/
|
||||||
*/
|
public static void addGlobalFatalMessage(String summary) {
|
||||||
public static void addGlobalFatalMessage(String summary, String detail) {
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, null);
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, detail);
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "messages" and severity
|
* Adds the given message as global message with severity "Fatal".
|
||||||
* "Information".
|
*
|
||||||
*
|
* @param summary the summary message to display
|
||||||
* @param summary the message to display
|
* @param detail the detailed message to display
|
||||||
* @deprecated use addInfoMessage(clientId, summary) or addGlobalInfoMessage
|
*/
|
||||||
* instead
|
public static void addGlobalFatalMessage(String summary, String detail) {
|
||||||
*/
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, detail);
|
||||||
@Deprecated
|
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||||
public static void addInfoMessage(String summary) {
|
}
|
||||||
addInfoMessage(summary, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "messages" and severity
|
* Adds the given message to the object with id "messages" and severity "Information".
|
||||||
* "Information".
|
*
|
||||||
*
|
* @param summary the message to display
|
||||||
* @param summary the summary message to display
|
* @deprecated use addInfoMessage(clientId, summary) or addGlobalInfoMessage instead
|
||||||
* @param detail the detailed message to display
|
*/
|
||||||
* @deprecated use addInfoMessage (clientId, summary, detail) or
|
@Deprecated
|
||||||
* addGlobalInfoMessage(summary, detail) instead
|
public static void addInfoMessage(String summary) {
|
||||||
*/
|
addInfoMessage(summary, "");
|
||||||
@Deprecated
|
}
|
||||||
public static void addInfoMessage(String summary, String detail) {
|
|
||||||
addInfoMessage("messages", summary, detail);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message with severity "Info" to the object with the id
|
* Adds the given message to the object with id "messages" and severity "Information".
|
||||||
* specified by clientId.
|
*
|
||||||
*
|
* @param summary the summary message to display
|
||||||
* @param clientId the id of the object to bind the message to.
|
* @param detail the detailed message to display
|
||||||
* @param summary the summary message to display
|
* @deprecated use addInfoMessage (clientId, summary, detail) or addGlobalInfoMessage(summary, detail) instead
|
||||||
* @param detail the detailed message to display
|
*/
|
||||||
*/
|
@Deprecated
|
||||||
public static void addInfoMessage(String clientId, String summary, String detail) {
|
public static void addInfoMessage(String summary, String detail) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
addInfoMessage("messages", summary, detail);
|
||||||
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "warnings" and severity
|
* Adds the given message with severity "Info" to the object with the id specified by clientId.
|
||||||
* "Error".
|
*
|
||||||
*
|
* @param clientId the id of the object to bind the message to.
|
||||||
* @param summary the message to display
|
* @param summary the summary message to display
|
||||||
* @deprecated use addErrorMessage (clientId, summary, detail) or
|
* @param detail the detailed message to display
|
||||||
* addGlobalErrorMessage(summary, detail) instead
|
*/
|
||||||
*/
|
public static void addInfoMessage(String clientId, String summary, String detail) {
|
||||||
@Deprecated
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
||||||
public static void addErrorMessage(String summary) {
|
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
||||||
addErrorMessage("warnings", summary, "");
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "warnings" and severity
|
* Adds the given message to the object with id "warnings" and severity "Error".
|
||||||
* "Error".
|
*
|
||||||
*
|
* @param summary the message to display
|
||||||
*
|
* @deprecated use addErrorMessage (clientId, summary, detail) or addGlobalErrorMessage(summary, detail) instead
|
||||||
* @param summary the summary message to display
|
*/
|
||||||
* @param detail the detailed message to display
|
@Deprecated
|
||||||
* @deprecated use addErrorMessage (clientId, summary, detail) or
|
public static void addErrorMessage(String summary) {
|
||||||
* addGlobalErrorMessage(summary, detail) instead
|
addErrorMessage("warnings", summary, "");
|
||||||
*/
|
}
|
||||||
@Deprecated
|
|
||||||
public static void addErrorMessage(String summary, String detail) {
|
|
||||||
addErrorMessage("warnings", summary, detail);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message with severity "Error" to the object with the id
|
* Adds the given message to the object with id "warnings" and severity "Error".
|
||||||
* specified by clientId.
|
*
|
||||||
*
|
*
|
||||||
* @param clientId the id of the object to bind the message to.
|
* @param summary the summary message to display
|
||||||
* @param summary the summary message to display
|
* @param detail the detailed message to display
|
||||||
* @param detail the detailed message to display
|
* @deprecated use addErrorMessage (clientId, summary, detail) or addGlobalErrorMessage(summary, detail) instead
|
||||||
*/
|
*/
|
||||||
public static void addErrorMessage(String clientId, String summary, String detail) {
|
@Deprecated
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, detail);
|
public static void addErrorMessage(String summary, String detail) {
|
||||||
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
addErrorMessage("warnings", summary, detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "warnings" and severity
|
* Adds the given message with severity "Error" to the object with the id specified by clientId.
|
||||||
* "Warning".
|
*
|
||||||
*
|
* @param clientId the id of the object to bind the message to.
|
||||||
* @param summary the message to display
|
* @param summary the summary message to display
|
||||||
* @deprecated use addWarningMessage (clientId, summary, detail) or
|
* @param detail the detailed message to display
|
||||||
* addGlobalWarningMessage(summary, detail) instead
|
*/
|
||||||
*/
|
public static void addErrorMessage(String clientId, String summary, String detail) {
|
||||||
@Deprecated
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, detail);
|
||||||
public static void addWarningMessage(String summary) {
|
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
||||||
addWarningMessage("warnings", summary, "");
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "warnings" and severity
|
* Adds the given message to the object with id "warnings" and severity "Warning".
|
||||||
* "Warning".
|
*
|
||||||
*
|
* @param summary the message to display
|
||||||
* @param summary the summary message to display
|
* @deprecated use addWarningMessage (clientId, summary, detail) or addGlobalWarningMessage(summary, detail) instead
|
||||||
* @param detail the detailed message to display
|
*/
|
||||||
* @deprecated use addWarningMessage (clientId, summary, detail) or
|
@Deprecated
|
||||||
* addGlobalWarningMessage(summary, detail) instead
|
public static void addWarningMessage(String summary) {
|
||||||
*/
|
addWarningMessage("warnings", summary, "");
|
||||||
@Deprecated
|
}
|
||||||
public static void addWarningMessage(String summary, String detail) {
|
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail);
|
|
||||||
FacesContext.getCurrentInstance().addMessage("warnings", message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message with severity "Warning" to the object with the id
|
* Adds the given message to the object with id "warnings" and severity "Warning".
|
||||||
* specified by clientId.
|
*
|
||||||
*
|
* @param summary the summary message to display
|
||||||
* @param clientId the id of the object to bind the message to.
|
* @param detail the detailed message to display
|
||||||
* @param summary the summary message to display
|
* @deprecated use addWarningMessage (clientId, summary, detail) or addGlobalWarningMessage(summary, detail) instead
|
||||||
* @param detail the detailed message to display
|
*/
|
||||||
*/
|
@Deprecated
|
||||||
public static void addWarningMessage(String clientId, String summary, String detail) {
|
public static void addWarningMessage(String summary, String detail) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail);
|
||||||
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
FacesContext.getCurrentInstance().addMessage("warnings", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message to the object with id "warnings" and severity
|
* Adds the given message with severity "Warning" to the object with the id specified by clientId.
|
||||||
* "Fatal".
|
*
|
||||||
*
|
* @param clientId the id of the object to bind the message to.
|
||||||
* @param summary the summary message to display
|
* @param summary the summary message to display
|
||||||
* @param detail the detailed message to display
|
* @param detail the detailed message to display
|
||||||
* @deprecated use addFatalMessage (clientId, summary, detail) or
|
*/
|
||||||
* addGlobalFatalMessage(summary, detail) instead
|
public static void addWarningMessage(String clientId, String summary, String detail) {
|
||||||
*/
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail);
|
||||||
@Deprecated
|
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
||||||
public static void addFatalMessage(String summary, String detail) {
|
}
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, detail);
|
|
||||||
FacesContext.getCurrentInstance().addMessage("warnings", message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given message with severity "Fatal" to the object with the id
|
* Adds the given message to the object with id "warnings" and severity "Fatal".
|
||||||
* specified by clientId.
|
*
|
||||||
*
|
* @param summary the summary message to display
|
||||||
* @param clientId the id of the object to bind the message to.
|
* @param detail the detailed message to display
|
||||||
* @param summary the summary message to display
|
* @deprecated use addFatalMessage (clientId, summary, detail) or addGlobalFatalMessage(summary, detail) instead
|
||||||
* @param detail the detailed message to display
|
*/
|
||||||
*/
|
@Deprecated
|
||||||
public static void addFatalMessage(String clientId, String summary, String detail) {
|
public static void addFatalMessage(String summary, String detail) {
|
||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, detail);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, detail);
|
||||||
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
FacesContext.getCurrentInstance().addMessage("warnings", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Adds the given message with severity "Fatal" to the object with the id specified by clientId.
|
||||||
* @param messages the messages to add
|
*
|
||||||
*/
|
* @param clientId the id of the object to bind the message to.
|
||||||
public static void addMessages(List<UIMessage> messages) {
|
* @param summary the summary message to display
|
||||||
messages.stream().map(msg -> msg.getFacesMessage()).forEach(msg -> {
|
* @param detail the detailed message to display
|
||||||
if (msg.getSeverity() == FacesMessage.SEVERITY_ERROR) {
|
*/
|
||||||
FacesUtil.addGlobalErrorMessage(msg.getSummary(), msg.getDetail());
|
public static void addFatalMessage(String clientId, String summary, String detail) {
|
||||||
} else if (msg.getSeverity() == FacesMessage.SEVERITY_WARN) {
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, detail);
|
||||||
FacesUtil.addGlobalWarningMessage(msg.getSummary(), msg.getDetail());
|
FacesContext.getCurrentInstance().addMessage(clientId, message);
|
||||||
} else if (msg.getSeverity() == FacesMessage.SEVERITY_FATAL) {
|
}
|
||||||
FacesUtil.addGlobalFatalMessage(msg.getSummary(), msg.getDetail());
|
|
||||||
} else {
|
/**
|
||||||
FacesUtil.addGlobalInfoMessage(msg.getSummary(), msg.getDetail());
|
*
|
||||||
}
|
* @param messages the messages to add
|
||||||
});
|
*/
|
||||||
}
|
public static void addMessages(List<UIMessage> messages) {
|
||||||
|
messages.stream().map(msg -> msg.getFacesMessage()).forEach(msg -> {
|
||||||
|
if (msg.getSeverity() == FacesMessage.SEVERITY_ERROR) {
|
||||||
|
FacesUtil.addGlobalErrorMessage(msg.getSummary(), msg.getDetail());
|
||||||
|
} else if (msg.getSeverity() == FacesMessage.SEVERITY_WARN) {
|
||||||
|
FacesUtil.addGlobalWarningMessage(msg.getSummary(), msg.getDetail());
|
||||||
|
} else if (msg.getSeverity() == FacesMessage.SEVERITY_FATAL) {
|
||||||
|
FacesUtil.addGlobalFatalMessage(msg.getSummary(), msg.getDetail());
|
||||||
|
} else {
|
||||||
|
FacesUtil.addGlobalInfoMessage(msg.getSummary(), msg.getDetail());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user