This is my XHTML of buttons in a dialog, and I do not know how to avoid closing the dialog when I give it to save and the data I have it in required, I explain: I want that when pressing save and inputText are empty the dialog is closed, but if they are full, it will close
<p:commandButton value="Guardar" icon="fa fa-save"
actionListener="#{soporteTipoBean.guardarSoporteDocumental}"
process="@this id_main:panelParamSop" update="id_main:msgs
id_main:nombreNitIPS
id_main:dt_ConsultaSoporte"
styleClass="GreenButton" oncomplete="PF('NewParamet').hide();"
onclick="PrimeFaces.cleanWatermarks()">
<p:resetInput
target="panelParamSop" />
</p:commandButton>