From 78a9aa10777eb2ef594a573ad86f245c0eb602c6 Mon Sep 17 00:00:00 2001 From: Mika Murtojarvi Date: Wed, 19 Aug 2015 10:50:35 +0300 Subject: Revert "Write true as attribute="" (#17519)" This reverts commit cdc07e55c12dc4ffbe509e15c4f4f165fb4a1670. Change-Id: Iad07a0292639d89c8f029c690005e7f1041eb79f --- server/src/com/vaadin/ui/AbstractComponent.java | 12 ++++++------ server/src/com/vaadin/ui/declarative/DesignFormatter.java | 6 +----- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'server/src') diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index f499cb1fec..18c3509af7 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -1170,16 +1170,16 @@ public abstract class AbstractComponent extends AbstractClientConnector // first try the full shorthands if (widthFull && heightFull) { - attributes.put("size-full", ""); + attributes.put("size-full", "true"); } else if (widthAuto && heightAuto) { - attributes.put("size-auto", ""); + attributes.put("size-auto", "true"); } else { // handle width if (!hasEqualWidth(defaultInstance)) { if (widthFull) { - attributes.put("width-full", ""); + attributes.put("width-full", "true"); } else if (widthAuto) { - attributes.put("width-auto", ""); + attributes.put("width-auto", "true"); } else { String widthString = DesignAttributeHandler.getFormatter() .format(getWidth()) + getWidthUnits().getSymbol(); @@ -1190,9 +1190,9 @@ public abstract class AbstractComponent extends AbstractClientConnector if (!hasEqualHeight(defaultInstance)) { // handle height if (heightFull) { - attributes.put("height-full", ""); + attributes.put("height-full", "true"); } else if (heightAuto) { - attributes.put("height-auto", ""); + attributes.put("height-auto", "true"); } else { String heightString = DesignAttributeHandler.getFormatter() .format(getHeight()) + getHeightUnits().getSymbol(); diff --git a/server/src/com/vaadin/ui/declarative/DesignFormatter.java b/server/src/com/vaadin/ui/declarative/DesignFormatter.java index 73c45caed4..b1d2520631 100644 --- a/server/src/com/vaadin/ui/declarative/DesignFormatter.java +++ b/server/src/com/vaadin/ui/declarative/DesignFormatter.java @@ -94,11 +94,7 @@ public class DesignFormatter implements Serializable { public String convertToPresentation(Boolean value, Class targetType, Locale locale) throws Converter.ConversionException { - if (value.booleanValue()) { - return ""; - } else { - return "false"; - } + return String.valueOf(value.booleanValue()); } @Override -- cgit v1.2.3