Author: sergeyhalipov
Date: 2007-12-28 07:30:26 -0500 (Fri, 28 Dec 2007)
New Revision: 5062
Modified:
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-1375
Modified:
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
---
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28
12:12:06 UTC (rev 5061)
+++
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28
12:30:26 UTC (rev 5062)
@@ -51,7 +51,7 @@
UIRichMessages uiMessages = (UIRichMessages)component;
- boolean isDisplayNone = (!messagesIter.hasNext() && !uiMessages.isPassed()) ?
true : false;
+ boolean isDisplayNone = !messagesIter.hasNext();
if(!isDisplayNone){
String [] levels = uiMessages.getLevel().split(",");
@@ -191,25 +191,17 @@
public void renderComponentOuterStyles(UIComponent component, FacesContext context,
ResponseWriter writer, boolean isDisplayNone) throws IOException {
UIRichMessages uiMessages = null;
- String displayStyle = null;
-
if(!(component instanceof UIRichMessages)){
return;
}
uiMessages = (UIRichMessages)component;
- if(isDisplayNone){
- displayStyle = "display: none";
- }
-
String parentStyle = (String)uiMessages.getAttributes().get("style");
String parentClass = (String)uiMessages.getAttributes().get("styleClass");
- if(displayStyle != null){
- parentStyle = (displayStyle != null) ? displayStyle + ";" + parentStyle :
parentStyle;
- }
+ parentStyle = ((isDisplayNone) ? "display: none; " : "") +
parentStyle;
String richMessageClass = "rich-messages";
parentClass = parentClass != null ? (richMessageClass + " " + parentClass) :
richMessageClass;