• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.IllegalStateException: duplicate Id for a component

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ashraf Abu-Aisheh
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Problem Solved by using <f:verbatim> as the following:


Thanks for all and many thanks for <f:verbatim>
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic