[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-dev
Subject:    [jira] [Commented] (MYFACES-4623) DuplicateIdException when adding component with resource in JSTL t
From:       "Manuel K (Jira)" <dev () myfaces ! apache ! org>
Date:       2023-08-22 7:56:00
Message-ID: JIRA.13546785.1691655098000.22246.1692690960015 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/MYFACES-4623?page=com.atlassian.jira.plugi \
n.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757231#comment-17757231 ] \


Manuel K commented on MYFACES-4623:
-----------------------------------

[~volosied] Does your comment in the PFE issue mean you know how to fix the bug? That \
would be great news indeed ;).

> DuplicateIdException when adding component with resource in JSTL tag handler
> ----------------------------------------------------------------------------
> 
> Key: MYFACES-4623
> URL: https://issues.apache.org/jira/browse/MYFACES-4623
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 4.0.1
> Reporter: Manuel K
> Priority: Major
> 
> The following error occurs when a JSF component adding a resource is added in a \
> JSTL tag handler: {code:java}
> org.apache.myfaces.view.facelets.compiler.DuplicateIdException: Component with \
> duplicate id "j_id__rd_5" found. The first component is {Component-Path : [Class: \
> jakarta.faces.component.UIViewRoot,ViewId: /test.xhtml][Class: \
> org.apache.myfaces.component.ComponentResourceContainer,Id: \
> jakarta_faces_location_head][Class: jakarta.faces.component.UIOutput,Id: \
> j_id__rd_5]} at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.createAndQueueException(CheckDuplicateIdFaceletUtils.java:139)
>  at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:95)
>  at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:109)
>  at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:103)
>  at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:81)
>  at org.apache.myfaces.view.facelets.PartialStateManagementStrategy.saveView(PartialStateManagementStrategy.java:701)
>  at jakarta.faces.application.StateManager.getViewState(StateManager.java:147)
> [...]{code}
> In our example, the resource that is apparently added to the component tree twice \
> is _inputmask/inputmask.js_ of the _p:calendar_ component when using it in a \
> {_}c:forEach{_}. The error only happens if _STRICT_JSF_2_FACELETS_COMPATIBILITY_ is \
> enabled, but that is a requirement for our application. The error does not occur in \
> Mojarra. I would appreciate you looking into this, as it is a pretty big problem \
> for us. And before you ask: We're using c:forEach because in our application \
> changing from c:forEach/c:if to ui:repeat/ui:fragment would result in an increase \
> of components in the component tree by a factor of about 5 on some sites. I could \
> copy and paste more of the code here, but I think it's easier to just look at the \
> reproducer: [https://github.com/mkomko/primefaces-test/tree/inputmask-duplicateid] \
> The error occurs when opening the dialog using the button and then clicking \
> "Cancel". Thank you very much in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic