From d3ee854224025950d5da4740e98c6d570e9765d6 Mon Sep 17 00:00:00 2001 From: Bernard Labno Date: Tue, 15 Mar 2011 18:55:38 +0000 Subject: [PATCH] Modified notify so that validation messages would contain only tiltle if both details and summary is the same. --- src/main/java/org/richfaces/renderkit/html/NotifyMessagesRenderer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/richfaces/renderkit/html/NotifyMessagesRenderer.java b/src/main/java/org/richfaces/renderkit/html/NotifyMessagesRenderer.java index f9eb13b..4d4ddd7 100644 --- a/src/main/java/org/richfaces/renderkit/html/NotifyMessagesRenderer.java +++ b/src/main/java/org/richfaces/renderkit/html/NotifyMessagesRenderer.java @@ -52,11 +52,11 @@ public class NotifyMessagesRenderer extends NotifyRenderer { } Iterator messages = messagesComponent.isGlobalOnly() - ? context.getMessages(null) : context.getMessages(); + ? context.getMessages(null) : context.getMessages(); while (messages.hasNext()) { FacesMessage msg = messages.next(); UINotify notify = (UINotify) context.getApplication() - .createComponent(UINotify.COMPONENT_TYPE); + .createComponent(UINotify.COMPONENT_TYPE); notify.setAnimationSpeed(messagesComponent.getAnimationSpeed()); notify.setAppearAnimation(messagesComponent.getAppearAnimation()); notify.setDelay(delay); @@ -72,7 +72,7 @@ public class NotifyMessagesRenderer extends NotifyRenderer { if (messagesComponent.isShowSummary()) { notify.setTitle(msg.getSummary()); } - if (messagesComponent.isShowDetail()) { + if (messagesComponent.isShowDetail() && msg.getDetail() != null && !msg.getDetail().equals(msg.getSummary())) { notify.setText(msg.getDetail()); } String styleClass = messagesComponent.getStyleClass(); -- libgit2 0.24.0