I am trying to show a dialog from either the web page, or from the bean. In either case it gives the above error and doesn't seem to be able to find the component in PF. I'm using PrimeFaces 5.2, and I don't seem to have the multiple version issue that was discussed here
I have pasted the relevant xhtml code below - the exact same behaviour occurs when I try to call it from the bean with:
RequestContext.getCurrentInstance().execute("PF('dlgTask').show();");
<ui:composition template="template-restricted.xhtml">
<ui:define name="body_content">
<div id="title" class="sl-title">#{text['project.title']} </div>
<p:dialog
id="taskDialog"
widgetVar="dlgTask"
modal="true"
closeOnEscape="true">
<h:form id="taskDialogForm">
<p:panelGrid columns="1" layout="grid">
<p:outputLabel for="taskName" value="#{text['name']}" />
<p:inputText
id="taskName"
value="#{editProject.editTask.name}" />
</p:panelGrid>
</h:form>
</p:dialog>
<p:commandButton
title="#{text['project.task.new']}"
disabled="#{not editProject.canEditProject}"
action="#{editProject.createNewTask}"
process="@form"
update="@form"
oncomplete="PF('dlgTask').show();"
icon="fa fa-plus" />