]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added helper for showing a notification with a description (#10401) 16/416/1
authorArtur Signell <artur@vaadin.com>
Wed, 28 Nov 2012 16:30:57 +0000 (18:30 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 28 Nov 2012 16:30:57 +0000 (18:30 +0200)
Change-Id: If51e73a62060384ae957af10efa270fb51c4ae8c

server/src/com/vaadin/ui/Notification.java

index 758d2c86a3a5201f84d851820c6a8c55f360624f..226d15b110aafb7835154fbd29ff95f4093dcac0 100644 (file)
@@ -392,4 +392,26 @@ public class Notification implements Serializable {
     public static void show(String caption, Type type) {
         new Notification(caption, type).show(Page.getCurrent());
     }
+
+    /**
+     * Shows a notification message the current page. The position and behavior
+     * of the message depends on the type, which is one of the basic types
+     * defined in {@link Notification}, for instance
+     * Notification.TYPE_WARNING_MESSAGE.
+     * 
+     * The caption is rendered as plain text with HTML automatically escaped.
+     * 
+     * @see #Notification(String, Type)
+     * @see #show(Page)
+     * 
+     * @param caption
+     *            The message
+     * @param description
+     *            The message description
+     * @param type
+     *            The message type
+     */
+    public static void show(String caption, String description, Type type) {
+        new Notification(caption, description, type).show(Page.getCurrent());
+    }
 }
\ No newline at end of file