myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thai Ha (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (MYFACES-1555) h:messages and h:message don't use style attribute when rendering
Date Mon, 05 Mar 2007 00:44:50 GMT
h:messages and h:message don't use style attribute when rendering
-----------------------------------------------------------------

                 Key: MYFACES-1555
                 URL: https://issues.apache.org/jira/browse/MYFACES-1555
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.5,  1.1.6-SNAPSHOT, 1.2.0-SNAPSHOT
            Reporter: Thai Ha
            Priority: Minor


When I use 
<h:messages layout="table" showSummary="false" showDetail="true" style="color: red"></h:messages>
the style attribute has no effect on generated html.
If I change it to
<h:messages layout="table" showSummary="false" showDetail="true" errorStyle="color: red"></h:messages>
then it works correctly.

I have looked at the code and here is the cause:

File: HtmlMessagesRendererBase.java (org/apache/myfaces/shared/renderkit/html/HtmlMessagesRendererBase.java)
Lines: 199-202
Code:
            if (style == null)
            {
                style = (String)attr.get(org.apache.myfaces.shared.renderkit.JSFAttr.STYLE_CLASS_ATTR);
            }

I believe that the attribute to be used here must be JSFAttr.STYLE_ATTR (not JSFAttr.STYLE_CLASS_ATTR)

This fix should apply to HtmlMessageRendererBase.java too because h:message has the same problem.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message