Details
- 
        Type:
 Bug
            
         - 
        Status: Closed
 - 
            Priority:
 Major
                
             - 
            Resolution: Fixed
 - 
            Affects Version/s: 2.0-Alpha2
 - 
            Fix Version/s: 2.0-Alpha3, 2.0.0
 - 
            Component/s: Framework
 - 
            Labels:None
 - 
            Environment:ICEfaces 2 JSF 2
 
Description
                    The MessagesRenderer, responsible for rendering the h:messages component, renders different nodes depending on whether there are messages or not.  When there are no messages to render, it renders:
<div id="messages"></div>
However, if there are messages to render, it replaces the div with a ul (or a table depending on how it's configured):
<ul id="messages"><li> Message added via actionListener: form:add </li></ul>
If the h:message component is a child of the body, the DOM diff algorithm will determine that the closest parent is html and send a window.location.reload() command back to the client.
            
<div id="messages"></div>
However, if there are messages to render, it replaces the div with a ul (or a table depending on how it's configured):
<ul id="messages"><li> Message added via actionListener: form:add </li></ul>
If the h:message component is a child of the body, the DOM diff algorithm will determine that the closest parent is html and send a window.location.reload() command back to the client.
We've logged a bug with JSF 2:
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1639
We'd like to see a common parent element with and id which would allow us to simply update the messages section directly.