"p: message" No Message in XHTML

0

Hello, I'm implementing a cadaster using the primefaces to display the critical messages I've made in the bean. I'm using FacesContext as below:

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

The message is inserted and displayed in the log of the application server, but with a warning:

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

And below are listed the critical messages, for example:

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

Would anyone know what it could be? Thanks

    
asked by anonymous 05.05.2018 / 22:24

1 answer

0

You need to capture these messages on the screen:

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