diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2015-03-17 11:47:53 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-05-28 14:59:49 +0000 |
commit | 96c08cd52e13e6d2ba5fee0580e9c2c7a5091a0f (patch) | |
tree | c78fc9b1b6b0126271279380c0d9f2d1d814c2dd /server/src/com/vaadin/ui/renderers/TextRenderer.java | |
parent | 550bd1e5e42b97de54ebcd02fda17325d52ef67d (diff) | |
download | vaadin-framework-96c08cd52e13e6d2ba5fee0580e9c2c7a5091a0f.tar.gz vaadin-framework-96c08cd52e13e6d2ba5fee0580e9c2c7a5091a0f.zip |
Adds a textual null representation to Grid renderers(#16560)7.5.0.beta2
Adds an optional textual value for null to Grid.AbstractRenderer
Change-Id: I4998476308e4259306f1774f309968520d8672e5
Diffstat (limited to 'server/src/com/vaadin/ui/renderers/TextRenderer.java')
-rw-r--r-- | server/src/com/vaadin/ui/renderers/TextRenderer.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/renderers/TextRenderer.java b/server/src/com/vaadin/ui/renderers/TextRenderer.java index 3723a45f70..0045024b2f 100644 --- a/server/src/com/vaadin/ui/renderers/TextRenderer.java +++ b/server/src/com/vaadin/ui/renderers/TextRenderer.java @@ -16,6 +16,7 @@ package com.vaadin.ui.renderers; import com.vaadin.ui.Grid.AbstractRenderer; +import elemental.json.JsonValue; /** * A renderer for presenting simple plain-text string values. @@ -29,6 +30,20 @@ public class TextRenderer extends AbstractRenderer<String> { * Creates a new text renderer */ public TextRenderer() { - super(String.class); + this(""); + } + + /** + * Creates a new text renderer + * @param nullRepresentation + * the textual representation of {@code null} value + */ + public TextRenderer(String nullRepresentation) { + super(String.class, nullRepresentation); + } + + @Override + public String getNullRepresentation() { + return super.getNullRepresentation(); } } |