The h:message and h:messages renderers don't provide a consistent parent 
element for updates 
---------------------------------------------------------------------------------------------

                 Key: MYFACES-3272
                 URL: https://issues.apache.org/jira/browse/MYFACES-3272
             Project: MyFaces Core
          Issue Type: Improvement
    Affects Versions: 2.1.1
            Reporter: Deryk Sinotte


We've documented some of the analysis in our own tracking system: 
http://jira.icefaces.org/browse/ICE-6622

The issue is that, with both the h:message and h:messages tags, the rendered 
output is empty if an "id" attribute is not provided. When an Ajax request 
triggers a message, the resulting update needs to look for a parent element - 
like the form or even the entire body depending on where the h:message(s) tag 
is located.  This can make the updates much larger than they need to be.

By adding an "id" attribute, the renderer will ouput a containing element, 
regardless of whether are messages or not:

h:message will render a <span id=... /> 
h:messages will render a <div id=... /> 

In the case of h:message, an update that actually contains the span will be 
replaced by a span - which is basically the behaviour we want.  But with 
h:messages, the div is replaced by ul which is less desirable as the actual 
element type is changing.

What we'd like to see is that the renderers provide consistent output at all 
times, whether there is a message or not.  So that a span or div with a id 
(generated if necessary) is always present and this consistent parent element 
would allow updates to be smaller and more efficient.

Note:  The same problem exists with Mojarra and we submitted an issue awhile 
ago but it's still pending: 
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-931

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to