I have a PrimeFaces data table that displays a set of users with a commandLink to delete on each row. When the link is clicked, a confirmDialog appears with a \"Yes\" button
The <p:confirmDialog ... appendToBody="true">
will cause the HTML representation of the confirm dialog to be relocated to end of HTML <body>
element by JavaScript during DOM ready.
This however causes that the HTML representation of the confirm dialog is not inside any form anymore. So effectively no form is been submitted and no request parameters are been sent and so JSF won't be able to idenfity the action.
You need to give the confirm dialog its own <h:form>
.
<p:confirmDialog ...>
<h:form>
...
</h:form>
</p:confirmDialog>
And to avoid confusion during maintenance (nesting forms is namely illegal), I also suggest to move that component to end of template, at least after the "outer" <h:form>
.