[richfaces-issues] [JBoss JIRA] (RF-13161) rich:notifyMessages CSS incorrect on MyFaces 2.x
Lukáš Fryč (JIRA)
jira-events at lists.jboss.org
Wed Sep 11 07:34:03 EDT 2013
[ https://issues.jboss.org/browse/RF-13161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803455#comment-12803455 ]
Lukáš Fryč edited comment on RF-13161 at 9/11/13 7:33 AM:
----------------------------------------------------------
NotifyMessage and Message uses different mechanism for severity resolution, even though they are both based on ordinal values.
The problem is probably based here:
https://github.com/richfaces/richfaces/blob/master/framework/src/main/java/org/richfaces/ui/message/NotifyMessageRendererBase.java#L121
Instead of ordinal value, we can use ordinal() - Severity.INFO.ordinal() to get zero-based severity index.
was (Author: lfryc):
NotifyMessage and Message uses different mechanism for severity resolution, even though they are both based on ordinal values.
> rich:notifyMessages CSS incorrect on MyFaces 2.x
> ------------------------------------------------
>
> Key: RF-13161
> URL: https://issues.jboss.org/browse/RF-13161
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.2.3.Final, 4.2.4, 4.3.0.Final, 4.3.1, 4.3.2, 4.3.3
> Reporter: John Yeary
> Assignee: Lukáš Fryč
> Labels: myfaces
> Attachments: myfaces-rf-example.zip, myfaces-rf-example.zip, RichfacesNotifyMessagesMyFaces.png
>
>
> The FacesMessage Severity levels do not match between Mojarra and MyFaces. As a result, the CSS styling for INFO messages are one level higher than they should be, and FATAL messages are unstyled.
> *Mojarra* - These represent values 0-3
> {noformat}
> /**
> * <p>Array of all defined values, ascending order of ordinal value.
> * Be sure you include any new instances created above, in the
> * same order.</p>
> */
> private static final Severity[] values =
> { SEVERITY_INFO, SEVERITY_WARN, SEVERITY_ERROR, SEVERITY_FATAL };
> {noformat}
> *MyFaces* - These represent values 1-4
> {noformat}
> /**
> * Message severity level indicating an informational message rather than an error.
> */
> public static final FacesMessage.Severity SEVERITY_INFO = new Severity("Info", 1);
> /**
> * Message severity level indicating that an error might have occurred.
> */
> public static final FacesMessage.Severity SEVERITY_WARN = new Severity("Warn", 2);
> /**
> * Message severity level indicating that an error has occurred.
> */
> public static final FacesMessage.Severity SEVERITY_ERROR = new Severity("Error", 3);
> /**
> * Message severity level indicating that a serious error has occurred.
> */
> public static final FacesMessage.Severity SEVERITY_FATAL = new Severity("Fatal", 4);
> {noformat}
> The *<rich:messages/>* component behaves correctly, and may be used as an alternative.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list