i have validation for three components in a dialog, onblur of the components as follows:
<p:message for="idEstNumOfUser" display="icon" id="msgEstNumOfUser" />
<p:inputText id="idEstNumOfUser"
placeholder="Estimated Number of Users"
value="#{mybean.estimatedUserCount}" required="true" requiredMessage="Estimated Number of Users Is Required"
maxlength="8" title="Estimated Number of Users"
validatorMessage="Please enter digits only for 'Estimated Number of Users'"
converterMessage="Please enter digits only for 'Estimated Number of Users'">
<f:convertNumber />
<p:ajax event="blur" update=":betasignup:msgEstNumOfUser" />
</p:inputText>
<p:message for="idTxtFirstName" display="icon" id="msgFirstName" />
<p:inputText id="idTxtFirstName" placeholder="First Name"
value="#{mybean.firstName}" required="true"
requiredMessage="First Name Is Required" maxlength="100"
title="First Name">
<p:ajax event="blur" update=":betasignup:msgFirstName" />
</p:inputText>
<p:message for="idTxtLastName" display="icon" id="msgLastName" />
<p:inputText id="idTxtLastName" placeholder="Last Name"
value="#{mybean.lastName}" required="true"
requiredMessage="Last Name Is Required" maxlength="100"
title="Last Name">
<p:ajax event="blur" update=":betasignup:msgLastName" />
</p:inputText>
<p:messages id="messages" autoUpdate="true"/>
my bean is has view scope.
CASE: when leaving first field empty and navigating to second field p:messages display message for first field, and when leaving second field empty and navigating to third field, p:messages clears messages for first field and displays only message for second field, and i want it to preserve old message (and remove the error message in case only error is fixed) and display both validation messages since first field and second field currently have validation errors.
EDIT: Dialog code
<h:form id="betasignup" title="#{msg['betasignup.text']}">
<p:dialog id="dlgSignUp" widgetVar="signUpDialog" resizable="false"
modal="true" header="#{msg['betasignup.header']}" styleClass="sign-up-dialog">
how i show the dialog:
<p:commandLink id="iam_interested2" styleClass="iam_interested"
oncomplete="signUpDialog.show()"
actionListener="#{myBean.init()}"
update=":betasignup">
please advise, thanks.