How can I set up a Primefaces Dialog to not hide, when there are "required-messages" open? At this moment, the dialog will closing by clicking on the "Speichern" Button, and when reopened, the messages appears... I would like to let the dialog open, when there are unfilled required fields:
<h:panelGrid id="createNewPat" columns="3" cellpadding="1" style="margin:0 auto;">
<h:outputText for="versNr" value="Versicherten-Nr.:" />
<p:inputMask id="versNr" value="#{patientenBean.versNr}" required="true"/>
<p:message for="versNr" />
<p:commandButton id="saveBtn" value="Speichern"
action="#{patientenBean.createPatient}"
oncomplete="if (!args.messageOccured) createNewPat.hide();"
update="patForm" />
<p:commandButton id="resetBtn" value="Reset" type="reset" />
</h:panelGrid>