P:messages duplicating messages Primefaces JSF

Asked

Viewed 174 times

0

Message duplication problems in Primefaces p:messages.

In the application I call this method just to insert the message. Follow 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 ?

http://i.imgur.com/Afn0byg.png

  • Guy like that gets tough, puts code for us to know the problem, the more codes the better.

  • In the application I call this method only to insert the message: http://pastebin.com/e8E7eLV1

  • to help, post more code.

  • I appreciate everyone’s answer, but the problem was structural. It has already been solved.

1 answer

0

Friends, there is no structural problem.

It is simple to solve the duplicate message, so you need to take showDetail="true" or put it to false showDetail="false"

That alone solves the duplication of the message.

Att, Thiago Neri

Browser other questions tagged

You are not signed in. Login or sign up in order to post.