您需要将对话框从主菜单中删除
<h:form></h:form>
并将每个对话框插入到其他窗体中。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html>
<h:head>
</h:head>
<h:body>
<h:form id="form">
</h:form>
<p:dialog appendTo="@(body)" header="Header" id="dialog1" widgetVar="dlg1" modal="true" showEffect="fade" hideEffect="fade" resizable="false" draggable="false">
<h:form id="firstDialog">
<br/>
<p:outputLabel value="Some text here?" style="font-size: 14px"/>
<br/>
<br/>
<p:separator/>
<div align="center" style="background-color: #DEDEDE">
<p:commandButton value="Yes" oncomplete="PF('dlg1').hide()" action="#{namedBean.method.execute()}" update=":form:growl, :form:dataList, :form:panelGrid" style="font-size: 14px; width: 100px"/>
<p:spacer width="20"/>
<p:commandButton value="Cancel" oncomplete="PF('dlg1').hide()" action="#{namedBean.method.execute()}" update=":form:growl" style="font-size: 14px; width: 100px"/>
</div>
</h:form>
</p:dialog>
<p:dialog appendTo="@(body)" header="Header" id="dialog2" widgetVar="dlgExcluir" modal="true" showEffect="fade" hideEffect="fade" resizable="false" draggable="false">
<h:form id="secondDialog">
<br/>
<p:outputLabel value="Tem certeza de que deseja excluir o equipamento #{equipamentosBean.selectedEquipamento.nome}?" style="font-size: 14px"/>
<br/>
<br/>
<p:separator/>
<div align="center" style="background-color: #DEDEDE">
<p:commandButton value="Sim" oncomplete="PF('dlg2').hide()" action="#{namedBean.method.execute()}" update=":form:growl, :form:dataList, :form:panelGrid" style="font-size: 14px; width: 100px"/>
<p:spacer width="20"/>
<p:commandButton value="Cancelar" oncomplete="PF('dlg2').hide()" action="#{namedBean.method.execute()}" update=":form:growl" style="font-size: 14px; width: 100px"/>
</div>
</h:form>
</p:dialog>
<p:dialog appendTo="@(body)" header="Header" id="dialog3" widgetVar="dlg3" modal="true" showEffect="fade" hideEffect="fade" resizable="false" draggable="false">
<h:form id="thirdDialog">
<br/>
<p:outputLabel value="Some text here?" style="font-size: 14px"/>
<br/>
<br/>
<p:separator/>
<div align="center" style="background-color: #DEDEDE">
<p:commandButton value="Yes" oncomplete="PF('dlg3').hide()" action="#{namedBean.method.execute()}" update=":form:growl, :form:dataList, :form:panelGrid" style="font-size: 14px; width: 100px"/>
<p:spacer width="20"/>
<p:commandButton value="Cancel" oncomplete="PF('dlg3').hide()" action="#{namedBean.method.execute()}" update=":form:growl" style="font-size: 14px; width: 100px"/>
</div>
</h:form>
</p:dialog>
</h:body>
</html>