Reputation: 11
I have a page with this code (jsf 2.1.22 and primefaces 3.5) :
<h:commandButton onclick="if (!confirm('Are you sure ?')) {return false};"
value="SUP" action="#{utilisateurControleur.supprimerUtilisateur}" type="submit"
rendered="#{profilModele.profil.codeProfil eq 'ACADMIN' and profilModele.utilisateur.login ne utilisateur.login}">
<f:setPropertyActionListener target="#{utilisateurModele.utilisateurSelectionne}" value="#{utilisateur}" />
</h:commandButton>
The following statement works :
onclick="if (!confirm('Are you sure ?')) {return false};"
but I wold like to show my popup where one answers yes or no :
confirmSuppressionUtilisateurDialog.show();
Impossible to find the solution, can you help me? Thank you
Upvotes: 0
Views: 52
Reputation: 138
Take a look at this: http://www.primefaces.org/showcase/ui/overlay/confirmDialog.xhtml I still have no idea why people don't just google their problems instead of posting it directly..
Upvotes: 1