Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.1.5, 1.1.6-SNAPSHOT, 1.2.0-SNAPSHOT
-
None
-
None
Description
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)
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.