added addMessage(clientId, message, validationFailed)

This commit is contained in:
2020-11-21 16:20:35 +01:00
parent 57907d05e6
commit b129228b36

View File

@ -69,6 +69,19 @@ public abstract class FacesUtil {
FacesContext.getCurrentInstance().addMessage(clientId, message); FacesContext.getCurrentInstance().addMessage(clientId, message);
} }
/**
* 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 message the message to display
*/
public static void addMessage(String clientId, FacesMessage message, boolean validationFailed) {
FacesContext.getCurrentInstance().addMessage(clientId, message);
if (validationFailed) {
FacesContext.getCurrentInstance().validationFailed();
}
}
/** /**
* Adds the given message as global message. * Adds the given message as global message.
* *