[ 
http://issues.apache.org/jira/browse/MYFACES-304?page=comments#action_12315156 
] 

Adam Winer commented on MYFACES-304:
------------------------------------

Use LinkedHashSet instead of HashSet to preserve the order in which IDs are 
added (which gives better results in h:messages, etc.).

Also HtmlMessagesRendererBase will now render global messages twice when 
globalOnly is false.  Simple fix;  change:
            _globalMessagesIterator = facesContext.getMessages(null);
            if (globalOnly)
            {
                _clientIdsWithMessagesIterator = NullIterator.instance();
            }
            else
            {
                _clientIdsWithMessagesIterator = 
facesContext.getClientIdsWithMessages();
            }
to:
            if (globalOnly)
            {
                 _globalMessagesIterator = facesContext.getMessages(null);
                _clientIdsWithMessagesIterator = NullIterator.instance();
            }
            else
            {
                _globalMessagesIterator = NullIterator.instance();
                _clientIdsWithMessagesIterator = 
facesContext.getClientIdsWithMessages();
            }


> FacesContext.getClientIdsWithMessages() fails to return null
> ------------------------------------------------------------
>
>          Key: MYFACES-304
>          URL: http://issues.apache.org/jira/browse/MYFACES-304
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>     Reporter: Adam Winer
>     Assignee: Grant Smith

>
> If a global message is added to the FacesContext (clientId is null), then 
> someone calls getClientIdsWithMessages(), the Iterator that is returned 
> should include null.  It does not;  it does correctly do this on the RI.
> Also, from code inspection, it appears that getClientIdsWithMessages() will 
> return a client ID twice if two messages are added against the same client ID.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to