P: messages duplicating JSF PrimeFaces messages

0

Problems with duplication of messages in the p: messages of PrimeFaces.

In the application I call this method just to insert the message. Here is the code:

public class FacesUtil {

    public static boolean isPostback() {
        return FacesContext.getCurrentInstance().isPostback();
    }

    public static boolean isNotPostback() {
        return !isPostback();
    }

    public static void addErrorMessage(String message) {
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
    }

    public static void addInfoMessage(String message) {
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
    }

Does anyone know why?

link

    
asked by anonymous 29.12.2016 / 23:01

0 answers