私のテンプレートの構造
レイアウト.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
...
<h:form id="headerForm" />
...
<ui:insert name="content">Put default content here, if any.</ui:insert>
...
統合.xhtml
<ui:composition template="/WEB-INF/templates/layout.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jstl/core">
<ui:define name="content">
...
<ui:insert name="tabContent">Tab content</ui:insert>
...
</ui:define>
customerSide.xhtml
<ui:composition template="/pages/protected/integration/integration.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<ui:define name="tabContent">
...
</ui:define>
</ui:composition>
ページに移動すると、http://localhost:8080/dcc/pages/protected/integration/customerSide.xhtml
この例外が発生します
java.lang.IllegalStateException: Component ID headerForm has already been found in the view.
headerForm では問題ありません。それを削除すると、ID を持つ次のコンポーネントで失敗します。エラーを発生させずにこれらのテンプレートをネストするにはどうすればよいですか?