wood burning stoves 2.0*
The moose likes JSF and the fly likes java.lang.IllegalStateException: duplicate Id for a component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "java.lang.IllegalStateException: duplicate Id for a component" Watch "java.lang.IllegalStateException: duplicate Id for a component" New topic
Author

java.lang.IllegalStateException: duplicate Id for a component

Ashraf Abu-Aisheh
Ranch Hand

Joined: Apr 17, 2009
Posts: 88
I try to mix between JSF and JSP like this:



and when i try to access the page first time it is work properly, but at the second time i got the following exception:



Note that every component inside the formUsersList form have unique Id.
I have test it in Jboss and Tomcat, the same exception still appearing.

Help me.


SCJP 5 - 79%
SCWCD 5 - 100%
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Mixing JSF and JSTL is often a recipe for trouble. I normally get this message when I've updated a JSF page definition and am trying to refresh it, but the cause is the same. Generally speaking, it means that the last display of the page doesn't match what you're currently attempting to output and the internal structure management is confused.

Normally the best way to enable/disable display of a JSF element is to use the "rendered" attribute, but I'm not sure if that applies to columns and I'm too lazy to read the manual. If that doesn't work, however, you should be able to create logic to insert the column definition dynamically as needed.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ashraf Abu-Aisheh
Ranch Hand

Joined: Apr 17, 2009
Posts: 88
The Problem Solved by using <f:verbatim> as the following:


Thanks for all and many thanks for <f:verbatim>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.IllegalStateException: duplicate Id for a component
 
Similar Threads
Input row select on data table does not get called
Rich:Datatable rerendering problem
Problem integration between JSF and JSP with rendered="#{...}"
two rich:datascroller in one page, one works, the other doesn't
Doubt in f:facet tag.. Please help me ..