diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-28 18:30:57 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-11-28 18:30:57 +0200 |
commit | 9e8bd4c9284f5ada1edaf0d8a1a798d5233edd92 (patch) | |
tree | 463698afd7ee0562375428aa86f4900a5fd8ffda /server/src/com/vaadin/ui/Notification.java | |
parent | 8693cae9f026a2fb1d69cb525511773042a72162 (diff) | |
download | vaadin-framework-9e8bd4c9284f5ada1edaf0d8a1a798d5233edd92.tar.gz vaadin-framework-9e8bd4c9284f5ada1edaf0d8a1a798d5233edd92.zip |
Added helper for showing a notification with a description (#10401)
Change-Id: If51e73a62060384ae957af10efa270fb51c4ae8c
Diffstat (limited to 'server/src/com/vaadin/ui/Notification.java')
-rw-r--r-- | server/src/com/vaadin/ui/Notification.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/Notification.java b/server/src/com/vaadin/ui/Notification.java index 758d2c86a3..226d15b110 100644 --- a/server/src/com/vaadin/ui/Notification.java +++ b/server/src/com/vaadin/ui/Notification.java @@ -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 |