diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java index b9eec4714b..40269adb26 100644 --- a/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java +++ b/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java @@ -83,4 +83,28 @@ public class ButtonRenderer<T> extends ClickableRenderer<T, String> { return (ButtonRendererState) super.getState(markAsDirty); } + /** + * Sets whether the data should be rendered as HTML (instead of text). + * <p> + * By default everything is rendered as text. + * + * @param htmlContentAllowed + * <code>true</code> to render as HTML, <code>false</code> to + * render as text + */ + public void setHtmlContentAllowed(boolean htmlContentAllowed) { + getState().htmlContentAllowed = htmlContentAllowed; + } + + /** + * Gets whether the data should be rendered as HTML (instead of text). + * <p> + * By default everything is rendered as text. + * + * @return <code>true</code> if the renderer renders a HTML, + * <code>false</code> if the content is rendered as text + */ + public boolean isHtmlContentAllowed() { + return getState(false).htmlContentAllowed; + } } |