It's not a secret anymore!
The moose likes JSF and the fly likes JSF1007: Duplicate component ID j_id10 found in view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF1007: Duplicate component ID j_id10 found in view" Watch "JSF1007: Duplicate component ID j_id10 found in view" New topic

JSF1007: Duplicate component ID j_id10 found in view

B Nirvan
Ranch Hand

Joined: Oct 20, 2010
Posts: 82
I am getting this error when I try to load my JSF page.

I am really cluless about this error. I am using PrimeFaces 2.2, Mojarra 2.0.3, Netbeans 6.9, Hibernate JPA.

Binnie Fabian

Joined: Oct 01, 2010
Posts: 12
Good Day,

Based on the error message itself, you got duplicate id's in your jsf page.

Try to search for id's that are the same then change one.


B Nirvan
Ranch Hand

Joined: Oct 20, 2010
Posts: 82
The ids are generated by the JSF framework (I haven't provided them) and I believe that they will be uniquely generated for each component in the View. Can we question the framework here ? Another point to emphasize is that I am using Primefaces which work with JSF.

Mahendra Pratap
Ranch Hand

Joined: Feb 25, 2008
Posts: 42


Try giving Id to all components in your view..and check whether is there any commandlink or commandbutton out of form.


Mariusz Choda

Joined: Apr 26, 2012
Posts: 4
The ID's should be unique in each jspx/jsf/xhtml page. Regarding cited error please read this article: JSF1007
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17257

You have "awakened a zombie". It's been about 3 years since anyone posted to this thread. In this industry at this time, it's even odds that all the original participants have moved on to other jobs and other projects. Even me, although I've kept the JavaRanch position for quite a while.

Component IDs do not need to be unique within the View Definition, just within a given naming container. Those containers must have unique ID within their parent naming containers (if any) and so on all the way up. The net result is that the generated HTML ID is unique, even though the JSF View Template Language ID is not.

However, the complaint here had to do with discrepancies that come from when the View Template does not contain an explicit ID and system-generated IDs (j_xxxxx) are created. JSF can get out of sync on those when a page is refreshed, which is why the first recommendation is to give stuff explicit IDs.

An IDE is no substitute for an Intelligent Developer.
Don't get me started about those stupid light bulbs.
subject: JSF1007: Duplicate component ID j_id10 found in view
It's not a secret anymore!