• Post Reply Bookmark Topic Watch Topic
  • New Topic

Duplicate component ID found in view

 
Palaninathan Arumugam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am getting the following error.
I am pasting the content of the code which is causing the problem.
Please help me.

Error: Duplicate component ID 'messageDetailsForm:_id8' found in
view.'

Code :

<tr>
<c:choose>
<c:when test="${ empty
sessionScope.ceoMessageRecordBean.businessObject.id}">
<td align="right" class=messageDetailsLabel><fmt:message
key="messages.emailOption"/></td>
<td align="left">
<h:selectOneMenu id="email"
required="true"
value="#
{ceoMessageRecordBean.businessObject.emailOption}">
<f:selectItem
itemValue="No Email"
itemLabel="No Email"/>
<f:selectItem
itemValue="All Employees"
itemLabel="All Employees"/>
</h:selectOneMenu>
<h:message for="email" styleClass="requiredText"/>
</td>
</c:when>
<c therwise>
<td align="right" class=messageDetailsLabel><fmt:message
key="messages.emailOption"/></td>
<td align="left"class=newsArticleDetailsText >
<c ut
value="${ceoMessageRecordBean.businessObject.emailOption}" />
</td>
</c therwise>
</c:choose>
</tr>

Thanks
palani
 
Justin Krettabull
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give each <f:selectItem /> a unique id and the problem will disappear I believe.

<f:selectItem id="abc123"
<f:selectItem id="def456"
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also, if you are hot deploying after changes running in tomcat you may need to stop tomcat and restart. I see that message alot in development.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!