]> source.dussan.org Git - vaadin-framework.git/commitdiff
#6097 Inversed the logic of the uidl attribute to avoid sending additional data when...
authorLeif Åstrand <leif@vaadin.com>
Fri, 12 Aug 2011 07:07:58 +0000 (07:07 +0000)
committerLeif Åstrand <leif@vaadin.com>
Fri, 12 Aug 2011 07:07:58 +0000 (07:07 +0000)
svn changeset:20338/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VNotification.java
src/com/vaadin/terminal/gwt/client/ui/VView.java
src/com/vaadin/ui/Window.java

index 4d06565e3c7ade671b7335304265e3d76b4d5a08..227bf4145238eb9bb0fb1605c099276a9a45214b 100644 (file)
@@ -356,8 +356,8 @@ public class VNotification extends VOverlay {
 \r
     public static void showNotification(ApplicationConnection client,\r
             final UIDL notification) {\r
-        boolean htmlContentAllowed = notification\r
-                .hasAttribute(VView.NOTIFICATION_HTML_CONTENT_ALLOWED);\r
+        boolean onlyPlainText = notification\r
+                .hasAttribute(VView.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED);\r
         String html = "";\r
         if (notification.hasAttribute("icon")) {\r
             final String parsedUri = client.translateVaadinUri(notification\r
@@ -366,7 +366,7 @@ public class VNotification extends VOverlay {
         }\r
         if (notification.hasAttribute("caption")) {\r
             String caption = notification.getStringAttribute("caption");\r
-            if (!htmlContentAllowed) {\r
+            if (onlyPlainText) {\r
                 caption = Util.escapeHTML(caption);\r
                 caption = caption.replaceAll("\\n", "<br />");\r
             }\r
@@ -374,7 +374,7 @@ public class VNotification extends VOverlay {
         }\r
         if (notification.hasAttribute("message")) {\r
             String message = notification.getStringAttribute("message");\r
-            if (!htmlContentAllowed) {\r
+            if (onlyPlainText) {\r
                 message = Util.escapeHTML(message);\r
                 message = message.replaceAll("\\n", "<br />");\r
             }\r
index 1e9a5ba5a0d67ede56143ec1c9e797c7d38d9240..e49b83447f676b4f0a3761f9db9e2fff4eb5562d 100644 (file)
@@ -47,7 +47,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
 
     private static final String CLASSNAME = "v-view";
 
-    public static final String NOTIFICATION_HTML_CONTENT_ALLOWED = "usehtml";
+    public static final String NOTIFICATION_HTML_CONTENT_NOT_ALLOWED = "useplain";
 
     private String theme;
 
index a16b6d585dfed4ca8e2b66060210e6f0fc6c575f..37f9967c08117efcd2459e1dd6142bed1f77d675 100644 (file)
@@ -663,9 +663,9 @@ public class Window extends Panel implements URIHandler, ParameterHandler,
                 if (n.getIcon() != null) {
                     target.addAttribute("icon", n.getIcon());
                 }
-                if (n.isHtmlContentAllowed()) {
+                if (!n.isHtmlContentAllowed()) {
                     target.addAttribute(
-                            VView.NOTIFICATION_HTML_CONTENT_ALLOWED, true);
+                            VView.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED, true);
                 }
                 target.addAttribute("position", n.getPosition());
                 target.addAttribute("delay", n.getDelayMsec());