3 Replies Latest reply on Apr 27, 2012 6:24 AM by Yash Yadav

    duplicate id of element inside facet when using ui:include

    Daniel Sapoundjiev Newbie

      Hi,

      I'm writting an application with JDK7, Tomcat 7, MyFaces 2.1.2 Richfaces 4.1 M1

       

      I get this exception from jsf

           throw new IllegalStateException ("component with duplicate id \"" + id + "\" found");

          

      It happens only for element that is in <facet> tag, only when this facet is in rich:extendedDataTable.

      This rich:extendedDataTable resides in separate composition EventPanel.xhtml

      This EventsPanel.xhtml in another xhtml like this - <ui:include src="EventsPanel.xhtml" />

      It happens when I click <aj4:commandButton> and it renderes the view.

       

      I attached the web.xml and xhtml files

       

      Please, help me !

       

      Here is my research:

      When I click the commandButton

      FacletServlet.services the request

      It creates a UIPanel for the facet. Because this is how jsf 2 works.

      And put the the outputText (that is in the facet) in this UIPanel.(jsf uipanel, not richfaces one)

      and it puts the same outputText every time I click the commandButton. Without removing it. So, same outputText appears many time in this UIPanel.

       

      in org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport is the method that do this - addFacet