I'm trying to display global error messages which are sent from EJB with:
FacesContext.getCurrentInstance().addMessage(
null,
new FacesMessage(FacesMessage.SEVERITY_ERROR,
"Please select a path first", "title"));
right now the JSF has the following code:
<h:messages globalOnly="true"/>
The above however doesn't work because the JSF page is not rerendered. Notice I am able to make the above work using primefaces, if I substitute the JSF code with the following:
<p:messages globalOnly="true" showDetail="true" autoUpdate="true" closable="true" />
However I don't want to use primefaces and I want a pure JSF solution. Notice also I don't want the h:messages to be inside a form as there's no button to click, I want the h:messages to be auto updated from the EJB but without using primefaces.