Firstly you really need validate your code, because this error says that you have two components with the same ID . Some times don’t have any duplicated id in my file, so what I can do now ? How resolve this problem?
The best way and the first tip is: You need only set value for id attributes where is really necessary. Why ?
The framework will auto-generate a unique values for ids, but it happens only when you don’t set any value in id attribute .
To know more you can look in the documentation of the responsible method for do this :
When I need use the ID and Name attributes ?
In the big part of the cases, it’s only happens if you need call the component. One example of this is when you want update some component after some event.
Example:
<p:selectOneMenu style="width:150px" value="#{myController.objectSelected}" converter="genericEntityConverter"> <f:selectItems value="#{myController.takeAllObjects()}" var="object" itemLabel="#{object.name}" itemValue="${object}"> </f:selectItems> <p:ajax event="change" process="@this" update="otherPanel"/> </p:selectOneMenu>
<h:panelGroup id="otherPanel"> {...} </h:panelGroup>