PF 3.5.10、モハラ 2.1.21、オムニフェイス 1.5
ダイアログ用の p:menu と p:include を含む Facelet-Template があります
mytemplate.xhtml:
<h:form> ... <p:menubar>
<p:menuitem value="Start Dialog" oncomplete="mydialogwidget.show()"/>
<p:menuitem value="open another page" action="/app/mypage.xhtml?faces-redirect=true"/>
</p:menubar> ... </h:form>
<ui:insert name="content" />
<ui:include="/app/mydialog.xhtml" />
mydialog.xhtml:
<ui:composition>
<p:dialog widgetVar="mydialogwidget" ...>
<h:form>
<p:datatable binding="#{mybean.table}">
<p:column id="col_first"> ... </p:column>
...
<p:column id="col_last"> ... </p:colum>
</p:datatable>
</h:form>
</p:dialog>
</ui:composition>
mypage.xhtml:
<ui:composition template="/app/mytemplate.xhtml">
<ui:define name="content">
<h:form> ... </h:form>
</ui:define>
</ui:composition>
mypage.xhtml フォーム メニューを起動すると、JSF1007 エラー (Duplicate ids) になります コンポーネント ツリーがコンソールに書き込まれます。簡略化されたコンポーネント ツリーの出力:
+id: mydialog
+id: mytable
+id: col_first <<=============
....
+id: col_last
+id:col_first <<========
はmydialog.xhtml
1 回だけ含まれます。Primefaces メニューの重複 ID エラーがある JSFの質問への回答は? 私を助けません。このエラーを回避するにはどうすればよいですか? このエラーはどこから来たのですか?