I am having a problem related to a dialog.
A dialog is show and allow to make a operation that persists information on database, when de operation has finished the dialog must be hidded, but if there is an error on server side the dialog should not be closed.
I am unable to mantain the popup if there is an error on server side.
¿Could you tell me somenthing to solve it?
Problems on dialog, how to control screen actions when controlated and non controlated errors happens on server side
-
- Posts: 81
- Joined: 26 Sep 2012, 12:51
In your validation method you can set
In the onComplete of the commandButton you could do this
Code: Select all
facesContext.validationFailed();
Code: Select all
oncomplete="if (!args.validationFailed) PF('dialog').hide()"
Primefaces 8.0.4, MyFaces 2.2.8, Tomcat 9.0.8
An alternative approach would be to use RequestContext in the server method.
This execute the following if all is good with the business logic.
Please see the manual for more details.
This execute the following if all is good with the business logic.
Please see the manual for more details.
Code: Select all
RequestContext.getCurrentInstance().execute("PF('dialog').hide()");
PrimeReact: 9.6.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0
-
- Information
-
Who is online
Users browsing this forum: No registered users and 45 guests