|
MyFaces 1.1.1 has duplicate ID problems. Upgrade
to 1.1.2 or higher.
On 6/23/06, Matt Hughes <[EMAIL PROTECTED] >
wrote:
I had been getting a duplicate id error in my JSF app
whenever I did a postback. The stacktrace looks
like:
java.lang.IllegalStateException: Client-id : _id5 is duplicated
in the faces
tree. at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds
(JspStateManagerImpl.java:241) at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:255) at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds
(JspStateManagerImpl.java:251) at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:251) at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds
(JspStateManagerImpl.java:255) at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:204) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java
:471) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
As you
can see from the stack trace, I am using MyFaces (v. 1.1.1), Facelets
(1.10). I kept eliminating code from the offending XHTML
and narrowed the problem down to the header facet inside a
datatable:
<h:commandLink action="" >Post back to this
page</h:commandLink>
<t:datatable
...> <t:column>
<h:facet
name="header"> <h:panelGroup>A
Header</h:panelGroup>
</h:facet> Column
Contents </t:column> </t:datatable>
Basically,
if I changed:
<h:panelGroup>A Header</h:panelGroup> to
<h:panelGroup id="someId">A Header</h:panelGroup>
I no
longer had the problem. Has anyone else experienced this
problem? I found a couple of JIRA issues that sounded similar to this
problem, but nothing concrete. Is this fixed in the latest
release?
|