what I want is that the window, which opens to type in some information about a new user(name,password,..), stays open if a validaton error occurs. I already tried many solutions from other posts but it just doesn't stay open. After I clicked on the save button it closes the window. When I reopen the dialog I can see red highlight on the required (and invalid) field. I hope you guys can help me.. I'm trying to solve this shit for 2 days...
<p:commandButton id="save" value="Save" udate="save" icon="ui-icon-disk"
ajax="false" validateClient="true"
action="#{userBean.addUser()}" oncomplete="if (args && !args.validationFailed) PF('newUser').hide()" />
<!-- oncomplete="if (!args.validationFailed &&args.saved) PF('newUser').hide();" -->
<p:commandButton id="cancel" value="Cancel" immidiate="true"
oncomplete="PF('newUser').hide()" />
<p:dialog>
in the presented code snippet? Is it hidden behindnewUser
? You are sending a full synchronous request by clicking a<p:commandButton>
(labelledSave
). Regarding that case, do you ever really think thisoncomplete="if (args && !args.validationFailed) PF('newUser').hide()"
may work as you might have already guessed/imagined/envisioned/visualized? – Tiny