Commit d3ee854224025950d5da4740e98c6d570e9765d6

Authored by bernard
1 parent 2a6e0fb1

Modified notify so that validation messages would contain only tiltle if both de…

…tails and summary is the same.
@@ -52,11 +52,11 @@ public class NotifyMessagesRenderer extends NotifyRenderer { @@ -52,11 +52,11 @@ public class NotifyMessagesRenderer extends NotifyRenderer {
52 } 52 }
53 53
54 Iterator<FacesMessage> messages = messagesComponent.isGlobalOnly() 54 Iterator<FacesMessage> messages = messagesComponent.isGlobalOnly()
55 - ? context.getMessages(null) : context.getMessages(); 55 + ? context.getMessages(null) : context.getMessages();
56 while (messages.hasNext()) { 56 while (messages.hasNext()) {
57 FacesMessage msg = messages.next(); 57 FacesMessage msg = messages.next();
58 UINotify notify = (UINotify) context.getApplication() 58 UINotify notify = (UINotify) context.getApplication()
59 - .createComponent(UINotify.COMPONENT_TYPE); 59 + .createComponent(UINotify.COMPONENT_TYPE);
60 notify.setAnimationSpeed(messagesComponent.getAnimationSpeed()); 60 notify.setAnimationSpeed(messagesComponent.getAnimationSpeed());
61 notify.setAppearAnimation(messagesComponent.getAppearAnimation()); 61 notify.setAppearAnimation(messagesComponent.getAppearAnimation());
62 notify.setDelay(delay); 62 notify.setDelay(delay);
@@ -72,7 +72,7 @@ public class NotifyMessagesRenderer extends NotifyRenderer { @@ -72,7 +72,7 @@ public class NotifyMessagesRenderer extends NotifyRenderer {
72 if (messagesComponent.isShowSummary()) { 72 if (messagesComponent.isShowSummary()) {
73 notify.setTitle(msg.getSummary()); 73 notify.setTitle(msg.getSummary());
74 } 74 }
75 - if (messagesComponent.isShowDetail()) { 75 + if (messagesComponent.isShowDetail() && msg.getDetail() != null && !msg.getDetail().equals(msg.getSummary())) {
76 notify.setText(msg.getDetail()); 76 notify.setText(msg.getDetail());
77 } 77 }
78 String styleClass = messagesComponent.getStyleClass(); 78 String styleClass = messagesComponent.getStyleClass();
Please register or login to post a comment