AjaxStateManager duplicate Id for a component exception
bek816 Jul 30, 2008 12:01 PMI posted this on the users forum, but I need to talk to someone technical.
We have an existing application that's roughly a year and a half old built using myFaces, Tomahawk, JSPs, tiles, and other open source components. A few months ago we added RichFaces to the mix, but have experienced nothing but grief with AjaxStateManager duplicate id exceptions. A typical exception is as follows:
duplicate Id for a component body:processForm:stateHistory_tab:claimStateHistory:_idJsp329 at org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:442) at org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:464) ... etc
Of note is that we seem to encounter these problems on tabs with subviews and included JSPs. It happens consistently after loading and viewing something twice. For example, in our application we can view an insurance claim or process the insurance claim by assigning it to yourself. If I view the claim, hit the browser back, and then press the command link to assign the claim to me, I consistently get a duplicate id exceptions. We NEVER had these exceptions before introducing RichFaces into the mix.
Breaking down the id in the exception:
"body": the body
"processForm": the form
"stateHistory_tab": The id of the subview
"claimStateHistory": An id for a panel grid with seven columns
"_idJsp329": unknown generated id
Unfortunately the source html does not full generate and I can't tell where (or what) the duplicate id is. In other words, I view source and the duplicate is "idJsp329" is not there in the html.
Is there a solution to these problems? We're currently using RichFaces 1.1.4. We tried upgrading to later versions, but none of them worked due to other flaws with RichFaces (not sending f:param, server state saving, etc).
Versions of the open source projects we use are:
MyFaces 1.1.4
Tomahawk 1.1.2
RichFaces 3.1.4
Note that we use JSPs and tiles.
I thought it best to add a code snippet. We have the following setup:
<h:form id="processForm" > <t:panelTabbedPane bgcolor="#FFFFCC" width="100%" id="piTabs" binding="#{myBackingBean.tabbedPane}" serverSideTabSwitch="false" activeTabStyleClass="activeTab" tabContentStyleClass="tabContent"> <f:subview id="stateHistory_tab" > <jsp:include page="claimProcessStateHistory.jsp"/> </f:subview> </t:panelTabbedPane> </h:form>
There are no duplicates on the inserted jsp, but the mere fact that it is inserted as a subview seems to cause RichFaces all sorts of grief.