Hi everyone,
please I'm really having a serious issue on the duplicate id for a component in view.
I have a page of which I used the <jsp:include> tag to add to some pages of my application.
The page have the following code snippet in it
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>
<f:subview id="footerView">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td>
<h:outputLink id="homeLink" value="#{facesContext.externalContext.requestContextPath}/index.jsf"
rendered="#{facesContext.viewRoot.viewId != '/index.jsp'}">
<h:outputText value="Home |"/>
</h:outputLink>
</td>
</tr>
</table>
</f:subview>
The problem is that I always get this exception :
java.lang.IllegalStateException: duplicate Id for a component footerView:homeLink
org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:326)
org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:236)
.........
This exception always occurs whenever I tried invoking an action or event call in like the ones listed
below in any of the enclosing page..
:
<h:selectOneRadio immediate="true" required="true" id="optionsRadio" value="#{myBean.optionType}" layout="lineDirection"valueChangeListener="#{eventBean.updateOptionTypeEvent}">
<f:selectItems value="#{listManagerBean.staticListDataMap['OPTION_TYPE']}"/>
<a4j:support ajaxSingle="true" ignoreDupResponses="true" immediate="true" event="onblur"/>
</h:selectOneRadio>
OR
<a4j:commandButton type="submit" value="Submit Now!" action="#{bean.someAction}"/>
.......
<h:commandButton type="submit" value="Click Me"/>
Yet there is no other component in view with the said id "footerView:homeLink".
So I'm really at a loss on what to do.
Any help will be greatly appreciated.