I'm using a PrimeFaces "global" p:ConfirmDialog and using the p:Confirm tag to call it for commandButton press. I'm having 2 problems with this - I'll give them each their own question, so each answer can be separately accepted.
The confirm dialog is appearing in the top left instead of the centre of the page.
I noticed that there was another question asked similar to this here, but I'm not certain that my issue is a RichFaces issue, although I do use RichFaces in my app also. Also that question doesn't seem to be answered.
Here is my relevant code:
<p:commandButton
title="#{text['delete']}"
icon="fa fa-trash"
process="@form"
update="@form"
action="#{manageOrgHierarchy.deleteUserPermissions(p)}" >
<p:confirm
header="#{text['confirm']}"
message="#{text['confirm.sure']}"
icon="fa fa-alert" />
</p:commandButton>
<p:confirmDialog
global="true"
showEffect="fade"
hideEffect="fade" >
<p:commandButton
value="Yes"
type="button"
styleClass="ui-confirmdialog-yes"
icon="ui-icon-check" />
<p:commandButton
value="No"
type="button"
styleClass="ui-confirmdialog-no"
icon="ui-icon-close" />
</p:confirmDialog>
This was caused by unrelated javascript in a menu section which declared a jquery.js library. When I removed the offending import, all of the strange Primefaces errors went away. It seems declaring other jquery libraries interferes with Primefaces code.