"<p:message" Does Not Display Message in XHTML

Asked

Viewed 83 times

0

Hello, I am implementing a register using the primefaces to present the critical messages performed in the bean. I’m using the Facescontext as below:

FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "", mensagem));

The message is inserted and presented in the application server log, but with a Warning:

WARNING: FacesMessage(s) have been enqueued, but may not have been displayed

And log below are listed the messages of criticism, for example:

sourceId=null[severity=(ERROR 2), summary=(), detail=(Nome não preenchido!)]

Would anyone know what that could be? Thank you

  • How are you calling the message in xhtml?

1 answer

0

You need to capture these messages on the screen:

<p:messages autoUpdate="true" showSummary="true" showDetail="true" ></p:messages>

Browser other questions tagged

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