Let ajax update the popup before opening it.
It is not clear which component library you are using for the pop-up window, but considering that it is PrimeFaces, it should look like this:
<h:form> .... <p:commandButton ... update=":dialog:form" oncomplete="dialog.open()" /> </h:form> <p:dialog id="dialog" widgetVar="dialog" visible="false" ...> <h:form id="form"> <p:messages /> ... <p:commandButton ... oncomplete="if (!args.validationFailed) dialog.hide()" /> </h:form> </p:dialog>
source share