I put rendered to two p:message then set true false using conditions to display the message but again it didn't work, I think there is no flexibility in primeface when showing two messages for an inputtext.
Code: Select all
<p:message for="tcidno2" id="messages111" autoUpdate="true" rendered="#{KisiInfoProcess.uyarimesaji}"/>
<p:message for="tcidno2" id="messages222" autoUpdate="true" rendered="#{KisiInfoProcess.gereklialan}"/>
Code: Select all
FacesContext.getCurrentInstance().addMessage(
"tcidno2",
new FacesMessage(FacesMessage.SEVERITY_WARN, "Uyarı!",
"Aynı TC Kimlik no ile kayıt yapamazsınız."));
FacesContext.getCurrentInstance().addMessage(
"tcidno2",
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Zorunlu alan!",
"Zorunlu alan !!!"));
On the link below also there is no example for having two warning messages for a required field
One with manage bean executing method of facescontext and p:messages for complete warning message for four inputtexts and p:message for one inputtext
http://www.primefaces.org/showcase/ui/m ... ages.xhtml