I use p:messagesto display an error without a UI on the page XHTML. I want to display String as Employee's. When I try to use the OmniFaces utility Messages, it does not appear. See below code for more details.
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 a single quote in a message?
source
share