diff options
author | Henri Sara <hesara@vaadin.com> | 2012-02-22 14:36:23 +0200 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-02-22 14:36:23 +0200 |
commit | e1907d68db5c3301560f542c2a00450550c20219 (patch) | |
tree | 180acb0686a58c843fa167541c0077883b983480 /src/com/vaadin/ui/Root.java | |
parent | 35905ef42d12b58538810f9b3435f3b311ca5af0 (diff) | |
download | vaadin-framework-e1907d68db5c3301560f542c2a00450550c20219.tar.gz vaadin-framework-e1907d68db5c3301560f542c2a00450550c20219.zip |
Use constants for some more UIDL attribute names.
Diffstat (limited to 'src/com/vaadin/ui/Root.java')
-rw-r--r-- | src/com/vaadin/ui/Root.java | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java index 7fd4a79458..47dcedd12a 100644 --- a/src/com/vaadin/ui/Root.java +++ b/src/com/vaadin/ui/Root.java @@ -30,6 +30,7 @@ import com.vaadin.terminal.Resource; import com.vaadin.terminal.WrappedRequest; import com.vaadin.terminal.WrappedRequest.BrowserDetails; import com.vaadin.terminal.gwt.client.MouseEventDetails; +import com.vaadin.terminal.gwt.client.ui.VNotification; import com.vaadin.terminal.gwt.client.ui.VView; import com.vaadin.tools.ReflectTools; import com.vaadin.ui.Window.CloseListener; @@ -512,22 +513,33 @@ public abstract class Root extends AbstractComponentContainer implements final Notification n = it.next(); target.startTag("notification"); if (n.getCaption() != null) { - target.addAttribute("caption", n.getCaption()); + target.addAttribute( + VNotification.ATTRIBUTE_NOTIFICATION_CAPTION, + n.getCaption()); } if (n.getDescription() != null) { - target.addAttribute("message", n.getDescription()); + target.addAttribute( + VNotification.ATTRIBUTE_NOTIFICATION_MESSAGE, + n.getDescription()); } if (n.getIcon() != null) { - target.addAttribute("icon", n.getIcon()); + target.addAttribute( + VNotification.ATTRIBUTE_NOTIFICATION_ICON, + n.getIcon()); } if (!n.isHtmlContentAllowed()) { target.addAttribute( VView.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED, true); } - target.addAttribute("position", n.getPosition()); - target.addAttribute("delay", n.getDelayMsec()); + target.addAttribute( + VNotification.ATTRIBUTE_NOTIFICATION_POSITION, + n.getPosition()); + target.addAttribute(VNotification.ATTRIBUTE_NOTIFICATION_DELAY, + n.getDelayMsec()); if (n.getStyleName() != null) { - target.addAttribute("style", n.getStyleName()); + target.addAttribute( + VNotification.ATTRIBUTE_NOTIFICATION_STYLE, + n.getStyleName()); } target.endTag("notification"); } |