diff options
author | Artur Signell <artur@vaadin.com> | 2015-01-27 13:51:22 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-01-27 15:30:20 +0000 |
commit | 2af61caa596eb39b211bb6c71809e6ecca63bae8 (patch) | |
tree | e192c92e7747153fc9dc0181ea06560ac8899f77 /client | |
parent | b8d69b6b397ba2d669aa16e297d900e5e079d1e9 (diff) | |
download | vaadin-framework-2af61caa596eb39b211bb6c71809e6ecca63bae8.tar.gz vaadin-framework-2af61caa596eb39b211bb6c71809e6ecca63bae8.zip |
Render Window caption as text when requested (#16273)
Change-Id: I15813f5fc305776282bdc9cb3d5dffd4f09ebf55
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VWindow.java | 9 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/window/WindowConnector.java | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index 615841ccb6..786ecf1267 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -880,11 +880,12 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, } public void setCaption(String c, String iconURL, boolean asHtml) { - String html = c; - if (!asHtml) { - c = Util.escapeHTML(c); + String html; + if (asHtml) { + html = c == null ? "" : c; + } else { + html = Util.escapeHTML(c); } - // Provide information to assistive device users that a sub window was // opened String prefix = "<span class='" diff --git a/client/src/com/vaadin/client/ui/window/WindowConnector.java b/client/src/com/vaadin/client/ui/window/WindowConnector.java index 703bcbbb5e..33cabd563a 100644 --- a/client/src/com/vaadin/client/ui/window/WindowConnector.java +++ b/client/src/com/vaadin/client/ui/window/WindowConnector.java @@ -378,7 +378,7 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector window.setAssistivePrefix(state.assistivePrefix); window.setAssistivePostfix(state.assistivePostfix); - window.setCaption(state.caption, iconURL); + window.setCaption(state.caption, iconURL, getState().captionAsHtml); window.setWaiAriaRole(getState().role); window.setAssistiveDescription(state.contentDescription); |