[ 
https://issues.apache.org/jira/browse/MYFACES-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739741#comment-17739741
 ] 

Melloware commented on MYFACES-4612:
------------------------------------

OK so in PrettyFaces the old code was doing this..
{code:java}
 for (Iterator<FacesMessage> iter = facesContext.getMessages(null); 
iter.hasNext(); ) {
            messages.add(iter.next());
            iter.remove();
        } {code}
Expecting that would remove all global messages but since MyFaces stores things 
in 2 different collection the other "Ordered" messages collection is never 
touched.  in Mojarra its one collection so this works.

> Quarkus: Duplicate messages
> ---------------------------
>
>                 Key: MYFACES-4612
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4612
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 4.0.1
>            Reporter: Melloware
>            Assignee: Melloware
>            Priority: Major
>
> See: [https://github.com/primefaces/primefaces/issues/10279]
>  
> MyFaces stores the same message in two different lists and Mojarra does not:
> {code:java}
> _messages = new LinkedHashMap<>(5, 1f);
> _orderedMessages = new ArrayList<>();
> List<FacesMessage> lst = _messages.computeIfAbsent(clientId, k -> new 
> ArrayList<>(3));         
> lst.add(message);
> _orderedMessages.add(message); {code}



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

Reply via email to