Hello, I'm glad to post my first message on this ml ;)
I have the infamous but well known duplicate id behaviour with the following code: <h:form> <p:commandButton action="#{sessionBean.add}" value="add" update=":myForm"/> <p:commandButton action="#{sessionBean.reset}" value="reset" update=":myForm"/> </h:form> <h:form id="myForm"> <c:forEach items="#{sessionBean.values}" var="value"> <ui:include src="#{value}"/> </c:forEach> </h:form> At the beginning "sessionBean.values" is empty. Action 1 : User clicks on "add", the add action adds "form0.xhtml" to "sessionBean.values". Action 2 : User clicks on "add", the add action adds "form1.xhtml" to "sessionBean.values". *form0.xhtml contains : * <p:fileUpload auto="false" mode="advanced" required="true" fileUploadListener="#{sessionBean.handleFileUpload}"/> * * *form1.xhtml contains :* <h:outputText value=""/> My issue is action 2 returns a duplicate id exception:<partial-response> <error><error-name>java.lang.IllegalStateException</error-name> <error-message><![CDATA[component with duplicate id "j_id4" found]]> </error-message></error></partial-response> j_id4 is the stylesheet of the fileUpload component : @ResourceDependency(library="primefaces", name="fileupload/fileupload.css"), This stylesheet is inserted with action 1. And it seems myfaces tries to insert it with action 2 too. Do I do something wrong ? Thanks for your help! Nicolas