I am using p:messages
for display error no UI in primefaces XHTML
page.
I want to display String like Employee's. When I am trying to use OmniFaces Messages
utility, it is not showing. For more detail look code below.
XHTML:
<p:messages id="globalMessages" autoUpdate="false" closable="true"
escape="true" showDetail="true"/>
Bean:
Messages.add(FacesMessage.SEVERITY_ERROR, "global", "employee's");
Presentation:
It works when I use plain FacesContext#addMessage()
:
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Info", "PrimeFaces Rocks employ's"));
Presentation:
But I have to use Messages.add(FacesMessage.SEVERITY_ERROR, "global", "employee's");
How is this caused and how can I display the single quote in the message?