users@javaserverfaces.java.net

Component ID x has already been found in the view

From: Andreas Kuhn <a.kuhn_at_asc-sb.de>
Date: Mon, 06 Jul 2015 16:41:15 +0200

Hello,

since updating to Mojarra 2.2.11 and Glassfish 4.1 we receive the
following error in our application:

"java.lang.IllegalStateException: Komponenten-ID form:qwe:panelTest
wurde bereits in der Ansicht gefunden."
(Translation would probably be: "Component ID form:qwe:panelTest has
already been found in the view")

The error happens when using a composite component that is conditionally
rendered by c:if and and a composite component outside of the c:if. Both
have different IDs but contain a h:panelGrid with the same id "panelTest".
After clicking a commandLink that changes the state of the c:if
condition in a session scoped bean, the error occurs.

I posted a small demonstration of the scenario to pastebin:

http://pastebin.com/p3XcBWdB


We also tried Mojarra 2.3.0-m2 and the problem still persists.

The application worked fine before with Mojarra 2.1.20 and Glassfish
3.1.2.2.

Regards,
Andreas Kuhn

-- 
Andreas Kuhn
ASC Software Solutions GmbH
Nell-Breuning-Allee 6
66125 Saarbrücken
URL:     http://www.asc-sb.de
E-Mail:   a.kuhn_at_asc-sb.de
Handelsregister: Amtsgericht Saarbrücken, HRB 18259
Geschäftsführer: Anton Schäfer