[ 
https://issues.apache.org/jira/browse/MYFACES-4631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko resolved MYFACES-4631.
----------------------------------------
    Resolution: Fixed

> DuplicateIdException via addComponentResource
> ---------------------------------------------
>
>                 Key: MYFACES-4631
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4631
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>            Reporter: Volodymyr Siedlecki
>            Priority: Major
>             Fix For: 4.0.2, 4.1.0
>
>
> See Bug Report here:
> [https://github.com/primefaces-extensions/primefaces-extensions/issues/517]
>  
> [https://github.com/omnifaces/omnifaces/wiki/Combine-hardcoded-PrimeFaces-resources-using-CombinedResourceHandler]
>  
> See comment here for root cause: 
> [https://github.com/primefaces-extensions/primefaces-extensions/issues/517#issuecomment-1688911766]
> {{{}I saw we had a id counter and it starts at 0 before the state is stored. 
> So when the script is added, it's always using the same counter. [ See 
> here.|https://github.com/apache/myfaces/blob/304099d4588383424df9105d5a751911c1c5301a/api/src/main/java/jakarta/faces/component/UIViewRoot.java#L493-L495]{}}}{{{}I
>  think the main issue is that we aren't adding ids to the nested items here: 
> [https://github.com/apache/myfaces/blob/304099d4588383424df9105d5a751911c1c5301a/api/src/main/java/jakarta/faces/component/UIViewRoot.java#L218-L224]{}}}
> {{We need to look at the children and also assign IDs. }}
> {{Only issue I see above is that I search only the immediate children and 
> don't drill down any further. Otherwise, it seems to fix the duplicate id 
> exception :)}}



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

Reply via email to