users@javaserverfaces.java.net

Re: Component ID x has already been found in the view

From: manfred riem <manfred.riem_at_oracle.com>
Date: Mon, 06 Jul 2015 09:51:26 -0500

Hi Andreas,

If the id of the panelGrid ends up being the same id for both then
you'll have to accommodate and make sure that is not the case.

Thanks!

Kind regards,
Manfred Riem

On 7/6/15, 9:41 AM, Andreas Kuhn wrote:
> 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
>