summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorTeppo Kurki <teppo.kurki@vaadin.com>2015-06-26 13:52:08 +0300
committerTeppo Kurki <teppo.kurki@vaadin.com>2015-06-26 13:52:48 +0300
commit9d8c26b49b9ef6900fe19745ac995cad5c5b74fc (patch)
tree505b6a86b2ed876b6c4bde4c57946ce58971ac09 /server
parent3065d80e1826bcacd53df1a4a214318253697272 (diff)
parentf7a852e3df45437568e54cff592aae50ae9a06ce (diff)
downloadvaadin-framework-9d8c26b49b9ef6900fe19745ac995cad5c5b74fc.tar.gz
vaadin-framework-9d8c26b49b9ef6900fe19745ac995cad5c5b74fc.zip
Merge branch 'master' into grid-unbuffered-editor
Change-Id: I82cdb7a08a62679b4717d480b50ab951ade8855c
Diffstat (limited to 'server')
-rw-r--r--server/build.xml10
-rw-r--r--server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java2
-rw-r--r--server/src/com/vaadin/server/ClientConnector.java4
-rw-r--r--server/src/com/vaadin/server/ComponentSizeValidator.java12
-rw-r--r--server/src/com/vaadin/server/LegacyCommunicationManager.java10
-rw-r--r--server/src/com/vaadin/server/VaadinService.java15
-rw-r--r--server/src/com/vaadin/server/communication/UidlWriter.java42
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java12
-rw-r--r--server/src/com/vaadin/ui/AbstractTextField.java33
-rw-r--r--server/src/com/vaadin/ui/Grid.java6
-rw-r--r--server/src/com/vaadin/ui/GridLayout.java12
-rw-r--r--server/src/com/vaadin/ui/Slider.java2
-rw-r--r--server/src/com/vaadin/ui/declarative/DesignFormatter.java6
-rw-r--r--server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java3
-rw-r--r--server/src/com/vaadin/ui/renderers/ButtonRenderer.java3
-rw-r--r--server/src/com/vaadin/ui/renderers/ClickableRenderer.java3
-rw-r--r--server/src/com/vaadin/ui/renderers/DateRenderer.java17
-rw-r--r--server/src/com/vaadin/ui/renderers/HtmlRenderer.java3
-rw-r--r--server/src/com/vaadin/ui/renderers/NumberRenderer.java15
-rw-r--r--server/src/com/vaadin/ui/renderers/TextRenderer.java1
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java3
-rw-r--r--server/tests/src/com/vaadin/server/VaadinServiceTest.java45
-rw-r--r--server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java21
-rw-r--r--server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignFormatterTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java16
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java52
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java14
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java33
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java24
65 files changed, 335 insertions, 231 deletions
diff --git a/server/build.xml b/server/build.xml
index e88b53d937..4bb2bde730 100644
--- a/server/build.xml
+++ b/server/build.xml
@@ -22,9 +22,17 @@
<fileset dir="${vaadin.basedir}/WebContent">
<include name="VAADIN/vaadinBootstrap.js" />
</fileset>
+ <fileset dir="${result.dir}">
+ <include name="VAADIN/*" />
+ </fileset>
</union>
- <target name="jar">
+ <target name="compress-files">
+ <mkdir dir="${result.dir}/VAADIN" />
+ <gzip src="${vaadin.basedir}/WebContent/VAADIN/vaadinBootstrap.js"
+ destfile="${result.dir}/VAADIN/vaadinBootstrap.js.gz" />
+ </target>
+ <target name="jar" depends="compress-files">
<property name="server.osgi.import"
value="javax.servlet;version=&quot;2.4.0&quot;,javax.servlet.http;version=&quot;2.4.0&quot;,javax.validation;version=&quot;1.0.0.GA&quot;;resolution:=optional,org.jsoup;version=&quot;1.6.3&quot;,org.jsoup.parser;version=&quot;1.6.3&quot;,org.jsoup.nodes;version=&quot;1.6.3&quot;,org.jsoup.helper;version=&quot;1.6.3&quot;,org.jsoup.safety;version=&quot;1.6.3&quot;,org.jsoup.select;version=&quot;1.6.3&quot;" />
<property name="server.osgi.require"
diff --git a/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java b/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java
index f07b7ecc58..86e9069e90 100644
--- a/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java
+++ b/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java
@@ -1279,7 +1279,7 @@ public class SQLContainer implements Container, Container.Filterable,
}
/**
- * Fetches a page from the data source based on the values of pageLenght and
+ * Fetches a page from the data source based on the values of pageLength and
* currentOffset. Also updates the set of primary keys, used in
* identification of RowItems.
*/
diff --git a/server/src/com/vaadin/server/ClientConnector.java b/server/src/com/vaadin/server/ClientConnector.java
index b784aa5d35..63483bc254 100644
--- a/server/src/com/vaadin/server/ClientConnector.java
+++ b/server/src/com/vaadin/server/ClientConnector.java
@@ -256,10 +256,6 @@ public interface ClientConnector extends Connector {
* client. Gives the connector an opportunity to set computed/dynamic state
* values or to invoke last minute RPC methods depending on other component
* features.
- * <p>
- * This method must not alter the component hierarchy in any way. Calling
- * {@link #markAsDirty()} from this method will have no effect.
- * </p>
*
* @param initial
* <code>true</code> if the client-side connector will be created
diff --git a/server/src/com/vaadin/server/ComponentSizeValidator.java b/server/src/com/vaadin/server/ComponentSizeValidator.java
index 1fbd840932..71023782ef 100644
--- a/server/src/com/vaadin/server/ComponentSizeValidator.java
+++ b/server/src/com/vaadin/server/ComponentSizeValidator.java
@@ -598,6 +598,12 @@ public class ComponentSizeValidator implements Serializable {
if (parent == null) {
return false;
} else if (parent.getWidth() < 0) {
+ if (parent instanceof Window) {
+ // Window has some weird haxxors to support 100% children when
+ // window is -1
+ return false;
+ }
+
return true;
} else if (parent.getWidthUnits() == Unit.PERCENTAGE) {
return isEffectiveUndefinedWidth(parent.getParent());
@@ -615,6 +621,12 @@ public class ComponentSizeValidator implements Serializable {
if (parent == null) {
return false;
} else if (parent.getHeight() < 0) {
+ if (parent instanceof Window) {
+ // Window has some weird haxxors to support 100% children when
+ // window is -1
+ return false;
+ }
+
return true;
} else if (parent.getHeightUnits() == Unit.PERCENTAGE) {
return isEffectiveUndefinedHeight(parent.getParent());
diff --git a/server/src/com/vaadin/server/LegacyCommunicationManager.java b/server/src/com/vaadin/server/LegacyCommunicationManager.java
index fda5ad444f..e982cdf10a 100644
--- a/server/src/com/vaadin/server/LegacyCommunicationManager.java
+++ b/server/src/com/vaadin/server/LegacyCommunicationManager.java
@@ -388,17 +388,15 @@ public class LegacyCommunicationManager implements Serializable {
}
/**
- * Handles an exception that occurred when processing RPC calls or a file
- * upload.
+ * Handles an exception related to a connector by invoking the appropriate
+ * error handler.
*
* @deprecated As of 7.1. See #11411.
*
- * @param ui
- * The UI where the exception occured
* @param throwable
- * The exception
+ * the exception to handle
* @param connector
- * The Rpc target
+ * the connector that the exception is related to
*/
@Deprecated
public void handleConnectorRelatedException(ClientConnector connector,
diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java
index 74f0051e30..bff71fedee 100644
--- a/server/src/com/vaadin/server/VaadinService.java
+++ b/server/src/com/vaadin/server/VaadinService.java
@@ -1574,8 +1574,8 @@ public abstract class VaadinService implements Serializable {
JsonObject appError = Json.createObject();
putValueOrJsonNull(appError, "caption", caption);
putValueOrJsonNull(appError, "url", url);
- putValueOrJsonNull(appError, "message",
- createCriticalNotificationMessage(message, details));
+ putValueOrJsonNull(appError, "message", message);
+ putValueOrJsonNull(appError, "details", details);
JsonObject meta = Json.createObject();
meta.put("appError", appError);
@@ -1595,17 +1595,6 @@ public abstract class VaadinService implements Serializable {
return "for(;;);[" + returnString + "]";
}
- private static String createCriticalNotificationMessage(String message,
- String details) {
- if (message == null) {
- return details;
- } else if (details != null) {
- return message + "<br/><br/>" + details;
- }
-
- return message;
- }
-
private static void putValueOrJsonNull(JsonObject json, String key,
String value) {
if (value == null) {
diff --git a/server/src/com/vaadin/server/communication/UidlWriter.java b/server/src/com/vaadin/server/communication/UidlWriter.java
index 3b2caba55b..a4797e49aa 100644
--- a/server/src/com/vaadin/server/communication/UidlWriter.java
+++ b/server/src/com/vaadin/server/communication/UidlWriter.java
@@ -23,7 +23,9 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -81,22 +83,44 @@ public class UidlWriter implements Serializable {
// to write out
service.runPendingAccessTasks(session);
- ArrayList<ClientConnector> dirtyVisibleConnectors = ui
- .getConnectorTracker().getDirtyVisibleConnectors();
+ Set<ClientConnector> processedConnectors = new HashSet<ClientConnector>();
+
LegacyCommunicationManager manager = session.getCommunicationManager();
// Paints components
ConnectorTracker uiConnectorTracker = ui.getConnectorTracker();
getLogger().log(Level.FINE, "* Creating response to client");
+ while (true) {
+ ArrayList<ClientConnector> connectorsToProcess = new ArrayList<ClientConnector>();
+ for (ClientConnector c : uiConnectorTracker.getDirtyConnectors()) {
+ if (!processedConnectors.contains(c)
+ && LegacyCommunicationManager
+ .isConnectorVisibleToClient(c)) {
+ connectorsToProcess.add(c);
+ }
+ }
+
+ if (connectorsToProcess.isEmpty()) {
+ break;
+ }
+
+ for (ClientConnector connector : connectorsToProcess) {
+ boolean initialized = uiConnectorTracker
+ .isClientSideInitialized(connector);
+ processedConnectors.add(connector);
+
+ try {
+ connector.beforeClientResponse(!initialized);
+ } catch (RuntimeException e) {
+ manager.handleConnectorRelatedException(connector, e);
+ }
+ }
+ }
+
getLogger().log(
Level.FINE,
- "Found " + dirtyVisibleConnectors.size()
+ "Found " + processedConnectors.size()
+ " dirty connectors to paint");
- for (ClientConnector connector : dirtyVisibleConnectors) {
- boolean initialized = uiConnectorTracker
- .isClientSideInitialized(connector);
- connector.beforeClientResponse(!initialized);
- }
uiConnectorTracker.setWritingResponse(true);
try {
@@ -292,7 +316,7 @@ public class UidlWriter implements Serializable {
session.getDragAndDropService().printJSONResponse(writer);
- for (ClientConnector connector : dirtyVisibleConnectors) {
+ for (ClientConnector connector : processedConnectors) {
uiConnectorTracker.markClientSideInitialized(connector);
}
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 18c3509af7..f499cb1fec 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", "true");
+ attributes.put("size-full", "");
} else if (widthAuto && heightAuto) {
- attributes.put("size-auto", "true");
+ attributes.put("size-auto", "");
} else {
// handle width
if (!hasEqualWidth(defaultInstance)) {
if (widthFull) {
- attributes.put("width-full", "true");
+ attributes.put("width-full", "");
} else if (widthAuto) {
- attributes.put("width-auto", "true");
+ attributes.put("width-auto", "");
} 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", "true");
+ attributes.put("height-full", "");
} else if (heightAuto) {
- attributes.put("height-auto", "true");
+ attributes.put("height-auto", "");
} else {
String heightString = DesignAttributeHandler.getFormatter()
.format(getHeight()) + getHeightUnits().getSymbol();
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java
index 14c135228c..93025ac0fd 100644
--- a/server/src/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/com/vaadin/ui/AbstractTextField.java
@@ -126,22 +126,25 @@ public abstract class AbstractTextField extends AbstractField<String> implements
selectionPosition = -1;
}
- target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE,
- getTextChangeEventMode().toString());
- target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT,
- getTextChangeTimeout());
- if (lastKnownTextContent != null) {
- /*
- * The field has be repainted for some reason (e.g. caption, size,
- * stylename), but the value has not been changed since the last
- * text change event. Let the client side know about the value the
- * server side knows. Client side may then ignore the actual value,
- * depending on its state.
- */
- target.addAttribute(
- TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS,
- true);
+ if (hasListeners(TextChangeEvent.class)) {
+ target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE,
+ getTextChangeEventMode().toString());
+ target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT,
+ getTextChangeTimeout());
+ if (lastKnownTextContent != null) {
+ /*
+ * The field has be repainted for some reason (e.g. caption,
+ * size, stylename), but the value has not been changed since
+ * the last text change event. Let the client side know about
+ * the value the server side knows. Client side may then ignore
+ * the actual value, depending on its state.
+ */
+ target.addAttribute(
+ TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS,
+ true);
+ }
}
+
}
@Override
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java
index b0542352b9..64f26b6205 100644
--- a/server/src/com/vaadin/ui/Grid.java
+++ b/server/src/com/vaadin/ui/Grid.java
@@ -3627,6 +3627,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
private final Footer footer = new Footer(this);
private Object editedItemId = null;
+ private boolean editorActive = false;
private FieldGroup editorFieldGroup = new CustomFieldGroup();
private CellStyleGenerator cellStyleGenerator;
@@ -5803,7 +5804,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* @return true iff the editor is open
*/
public boolean isEditorActive() {
- return editedItemId != null;
+ return editorActive;
}
private void checkColumnExists(Object propertyId) {
@@ -5878,6 +5879,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
.getPropertyId());
}
+ editorActive = true;
// Must ensure that all fields, recursively, are sent to the client
// This is needed because the fields are hidden using isRendered
for (Field<?> f : getEditorFields()) {
@@ -5929,6 +5931,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
protected void doCancelEditor() {
editedItemId = null;
+ editorActive = false;
editorFieldGroup.discard();
editorFieldGroup.setItemDataSource(null);
}
@@ -5946,6 +5949,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
editedItemId = null;
+ editorActive = false;
editorFieldGroup = new CustomFieldGroup();
}
diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java
index 6ccb272704..792ad72dcc 100644
--- a/server/src/com/vaadin/ui/GridLayout.java
+++ b/server/src/com/vaadin/ui/GridLayout.java
@@ -1319,11 +1319,15 @@ public class GridLayout extends AbstractLayout implements
setMargin(readMargin(design, getMargin(), designContext));
- // Prepare a 2D map for reading column contents
- Elements rowElements = design.getElementsByTag("row");
+ List<Element> rowElements = new ArrayList<Element>();
List<Map<Integer, Component>> rows = new ArrayList<Map<Integer, Component>>();
- for (int i = 0; i < rowElements.size(); ++i) {
- rows.add(new HashMap<Integer, Component>());
+ // Prepare a 2D map for reading column contents
+ for (Element e : design.children()) {
+ if (e.tagName().equalsIgnoreCase("row")) {
+ rowElements.add(e);
+ rows.add(new HashMap<Integer, Component>());
+
+ }
}
setRows(Math.max(rows.size(), 1));
diff --git a/server/src/com/vaadin/ui/Slider.java b/server/src/com/vaadin/ui/Slider.java
index 2e00628eb0..15c94b6d3c 100644
--- a/server/src/com/vaadin/ui/Slider.java
+++ b/server/src/com/vaadin/ui/Slider.java
@@ -285,7 +285,7 @@ public class Slider extends AbstractField<Double> {
final int resolution = getResolution();
double ratio = Math.pow(10, resolution);
- if(v >= 0) {
+ if (v >= 0) {
return Math.floor(v * ratio) / ratio;
} else {
return Math.ceil(v * ratio) / ratio;
diff --git a/server/src/com/vaadin/ui/declarative/DesignFormatter.java b/server/src/com/vaadin/ui/declarative/DesignFormatter.java
index b1d2520631..73c45caed4 100644
--- a/server/src/com/vaadin/ui/declarative/DesignFormatter.java
+++ b/server/src/com/vaadin/ui/declarative/DesignFormatter.java
@@ -94,7 +94,11 @@ public class DesignFormatter implements Serializable {
public String convertToPresentation(Boolean value,
Class<? extends String> targetType, Locale locale)
throws Converter.ConversionException {
- return String.valueOf(value.booleanValue());
+ if (value.booleanValue()) {
+ return "";
+ } else {
+ return "false";
+ }
}
@Override
diff --git a/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java b/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java
index 104e07f02f..57e8130b29 100644
--- a/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java
@@ -105,7 +105,8 @@ public abstract class AbstractJavaScriptRenderer<T> extends AbstractRenderer<T>
private JavaScriptCallbackHelper callbackHelper = new JavaScriptCallbackHelper(
this);
- protected AbstractJavaScriptRenderer(Class<T> presentationType, String nullRepresentation) {
+ protected AbstractJavaScriptRenderer(Class<T> presentationType,
+ String nullRepresentation) {
super(presentationType, nullRepresentation);
}
diff --git a/server/src/com/vaadin/ui/renderers/ButtonRenderer.java b/server/src/com/vaadin/ui/renderers/ButtonRenderer.java
index a747e45713..e7e723ebd6 100644
--- a/server/src/com/vaadin/ui/renderers/ButtonRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/ButtonRenderer.java
@@ -45,7 +45,8 @@ public class ButtonRenderer extends ClickableRenderer<String> {
* @param nullRepresentation
* the textual representation of {@code null} value
*/
- public ButtonRenderer(RendererClickListener listener, String nullRepresentation) {
+ public ButtonRenderer(RendererClickListener listener,
+ String nullRepresentation) {
this(nullRepresentation);
addClickListener(listener);
}
diff --git a/server/src/com/vaadin/ui/renderers/ClickableRenderer.java b/server/src/com/vaadin/ui/renderers/ClickableRenderer.java
index 01e939bb67..7210eb7840 100644
--- a/server/src/com/vaadin/ui/renderers/ClickableRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/ClickableRenderer.java
@@ -106,7 +106,8 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
this(presentationType, null);
}
- protected ClickableRenderer(Class<T> presentationType, String nullRepresentation) {
+ protected ClickableRenderer(Class<T> presentationType,
+ String nullRepresentation) {
super(presentationType, nullRepresentation);
registerRpc(new RendererClickRpc() {
@Override
diff --git a/server/src/com/vaadin/ui/renderers/DateRenderer.java b/server/src/com/vaadin/ui/renderers/DateRenderer.java
index 092b3f405e..dddeb6cd77 100644
--- a/server/src/com/vaadin/ui/renderers/DateRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/DateRenderer.java
@@ -72,7 +72,8 @@ public class DateRenderer extends AbstractRenderer<Date> {
* @throws IllegalArgumentException
* if {@code locale} is {@code null}
*/
- public DateRenderer(Locale locale, String nullRepresentation) throws IllegalArgumentException {
+ public DateRenderer(Locale locale, String nullRepresentation)
+ throws IllegalArgumentException {
this("%s", locale, nullRepresentation);
}
@@ -110,7 +111,8 @@ public class DateRenderer extends AbstractRenderer<Date> {
* href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
- public DateRenderer(String formatString, String nullRepresentation) throws IllegalArgumentException {
+ public DateRenderer(String formatString, String nullRepresentation)
+ throws IllegalArgumentException {
this(formatString, Locale.getDefault(), nullRepresentation);
}
@@ -132,8 +134,9 @@ public class DateRenderer extends AbstractRenderer<Date> {
*/
public DateRenderer(String formatString, Locale locale)
throws IllegalArgumentException {
- this(formatString,locale, "");
+ this(formatString, locale, "");
}
+
/**
* Creates a new date renderer.
* <p>
@@ -152,8 +155,8 @@ public class DateRenderer extends AbstractRenderer<Date> {
* href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
- public DateRenderer(String formatString, Locale locale, String nullRepresentation)
- throws IllegalArgumentException {
+ public DateRenderer(String formatString, Locale locale,
+ String nullRepresentation) throws IllegalArgumentException {
super(Date.class, nullRepresentation);
if (formatString == null) {
@@ -182,6 +185,7 @@ public class DateRenderer extends AbstractRenderer<Date> {
public DateRenderer(DateFormat dateFormat) throws IllegalArgumentException {
this(dateFormat, "");
}
+
/**
* Creates a new date renderer.
* <p>
@@ -192,7 +196,8 @@ public class DateRenderer extends AbstractRenderer<Date> {
* @throws IllegalArgumentException
* if {@code dateFormat} is {@code null}
*/
- public DateRenderer(DateFormat dateFormat, String nullRepresentation) throws IllegalArgumentException {
+ public DateRenderer(DateFormat dateFormat, String nullRepresentation)
+ throws IllegalArgumentException {
super(Date.class, nullRepresentation);
if (dateFormat == null) {
throw new IllegalArgumentException("date format may not be null");
diff --git a/server/src/com/vaadin/ui/renderers/HtmlRenderer.java b/server/src/com/vaadin/ui/renderers/HtmlRenderer.java
index df89c60ad2..2ec43800c0 100644
--- a/server/src/com/vaadin/ui/renderers/HtmlRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/HtmlRenderer.java
@@ -28,7 +28,8 @@ public class HtmlRenderer extends AbstractRenderer<String> {
/**
* Creates a new HTML renderer.
*
- * @param nullRepresentation the html representation of {@code null} value
+ * @param nullRepresentation
+ * the html representation of {@code null} value
*/
public HtmlRenderer(String nullRepresentation) {
super(String.class, nullRepresentation);
diff --git a/server/src/com/vaadin/ui/renderers/NumberRenderer.java b/server/src/com/vaadin/ui/renderers/NumberRenderer.java
index 1d4d7e0ec9..b1ba309c9a 100644
--- a/server/src/com/vaadin/ui/renderers/NumberRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/NumberRenderer.java
@@ -69,7 +69,7 @@ public class NumberRenderer extends AbstractRenderer<Number> {
* @param nullRepresentation
* the textual representation of {@code null} value
* @throws IllegalArgumentException
- * if {@code numberFormat} is {@code null}
+ * if {@code numberFormat} is {@code null}
*/
public NumberRenderer(NumberFormat numberFormat, String nullRepresentation)
throws IllegalArgumentException {
@@ -112,8 +112,10 @@ public class NumberRenderer extends AbstractRenderer<Number> {
* @throws IllegalArgumentException
* if {@code locale} is {@code null}
*/
- public NumberRenderer(String formatString, Locale locale) throws IllegalArgumentException {
- this(formatString, locale, ""); //This will call #toString() during formatting
+ public NumberRenderer(String formatString, Locale locale)
+ throws IllegalArgumentException {
+ this(formatString, locale, ""); // This will call #toString() during
+ // formatting
}
/**
@@ -122,8 +124,8 @@ public class NumberRenderer extends AbstractRenderer<Number> {
* The renderer is configured to render with the given format string in the
* default locale.
*
- * @param
- * formatString the format string with which to format the number
+ * @param formatString
+ * the format string with which to format the number
* @throws IllegalArgumentException
* if {@code formatString} is {@code null}
* @see <a
@@ -150,7 +152,8 @@ public class NumberRenderer extends AbstractRenderer<Number> {
* href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
- public NumberRenderer(String formatString, Locale locale, String nullRepresentation) {
+ public NumberRenderer(String formatString, Locale locale,
+ String nullRepresentation) {
super(Number.class, nullRepresentation);
if (formatString == null) {
diff --git a/server/src/com/vaadin/ui/renderers/TextRenderer.java b/server/src/com/vaadin/ui/renderers/TextRenderer.java
index 0045024b2f..ce8a73d057 100644
--- a/server/src/com/vaadin/ui/renderers/TextRenderer.java
+++ b/server/src/com/vaadin/ui/renderers/TextRenderer.java
@@ -35,6 +35,7 @@ public class TextRenderer extends AbstractRenderer<String> {
/**
* Creates a new text renderer
+ *
* @param nullRepresentation
* the textual representation of {@code null} value
*/
diff --git a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java
index 012d0ef0bc..1f42f4e935 100644
--- a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java
@@ -6,7 +6,8 @@ import com.vaadin.data.Container.Filter;
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
-public class AndOrFilterTest extends AbstractFilterTestBase<AbstractJunctionFilter> {
+public class AndOrFilterTest extends
+ AbstractFilterTestBase<AbstractJunctionFilter> {
protected Item item1 = new BeanItem<Integer>(1);
protected Item item2 = new BeanItem<Integer>(2);
diff --git a/server/tests/src/com/vaadin/server/VaadinServiceTest.java b/server/tests/src/com/vaadin/server/VaadinServiceTest.java
index 4b655e7855..bd3da6277a 100644
--- a/server/tests/src/com/vaadin/server/VaadinServiceTest.java
+++ b/server/tests/src/com/vaadin/server/VaadinServiceTest.java
@@ -42,9 +42,10 @@ public class VaadinServiceTest {
}
}
- private String createCriticalNotification(String caption, String message, String details, String url) {
- return VaadinService
- .createCriticalNotificationJSON(caption, message, details, url);
+ private String createCriticalNotification(String caption, String message,
+ String details, String url) {
+ return VaadinService.createCriticalNotificationJSON(caption, message,
+ details, url);
}
@Test
@@ -77,64 +78,64 @@ public class VaadinServiceTest {
@Test
public void captionIsSetToACriticalNotification() {
- String notification =
- createCriticalNotification("foobar", "message", "details", "url");
+ String notification = createCriticalNotification("foobar", "message",
+ "details", "url");
assertThat(notification, containsString("\"caption\":\"foobar\""));
}
@Test
public void nullCaptionIsSetToACriticalNotification() {
- String notification =
- createCriticalNotification(null, "message", "details", "url");
+ String notification = createCriticalNotification(null, "message",
+ "details", "url");
assertThat(notification, containsString("\"caption\":null"));
}
@Test
public void messageWithDetailsIsSetToACriticalNotification() {
- String notification =
- createCriticalNotification("caption", "foo", "bar", "url");
+ String notification = createCriticalNotification("caption", "foo",
+ "bar", "url");
- assertThat(notification, containsString("\"message\":\"foo<br/><br/>bar\""));
+ assertThat(notification, containsString("\"details\":\"bar\""));
}
@Test
- public void nullMessageIsReplacedByDetailsInACriticalNotification() {
- String notification =
- createCriticalNotification("caption", null, "foobar", "url");
+ public void nullMessageSentAsNullInACriticalNotification() {
+ String notification = createCriticalNotification("caption", null,
+ "foobar", "url");
- assertThat(notification, containsString("\"message\":\"foobar\""));
+ assertThat(notification, containsString("\"message\":null"));
}
@Test
public void nullMessageIsSetToACriticalNotification() {
- String notification =
- createCriticalNotification("caption", null, null, "url");
+ String notification = createCriticalNotification("caption", null, null,
+ "url");
assertThat(notification, containsString("\"message\":null"));
}
@Test
public void messageSetToACriticalNotification() {
- String notification =
- createCriticalNotification("caption", "foobar", null, "url");
+ String notification = createCriticalNotification("caption", "foobar",
+ null, "url");
assertThat(notification, containsString("\"message\":\"foobar\""));
}
@Test
public void urlIsSetToACriticalNotification() {
- String notification =
- createCriticalNotification("caption", "message", "details", "foobar");
+ String notification = createCriticalNotification("caption", "message",
+ "details", "foobar");
assertThat(notification, containsString("\"url\":\"foobar\""));
}
@Test
public void nullUrlIsSetToACriticalNotification() {
- String notification =
- createCriticalNotification("caption", "message", "details", null);
+ String notification = createCriticalNotification("caption", "message",
+ "details", null);
assertThat(notification, containsString("\"url\":null"));
}
diff --git a/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java b/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
index 3bc1ebfbf9..d058ae1dcd 100644
--- a/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
@@ -38,10 +38,10 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
@Test
// #16328
public void testReadWrite() throws IOException {
- String design = "<v-menu-bar auto-open='true' tabindex=5>"
- + "<menu checkable='true'>Save</menu>"
+ String design = "<v-menu-bar auto-open='' tabindex=5>"
+ + "<menu checkable=''>Save</menu>"
+ "<menu description='Open a file'>Open</menu>"
- + "<menu disabled='true'>Close</menu>"
+ + "<menu disabled=''>Close</menu>"
+ "<menu icon='http://foo.bar/ico.png'>Help</menu>"
+ "<menu visible='false'>About</menu>"
+ "<menu>Sub<menu>Item</menu></menu>"
@@ -69,19 +69,19 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
@Test
// #16328
public void testTicketSpec1() throws IOException {
- String design = "<v-menu-bar auto-open='true' plain-text tabindex=5> "
+ String design = "<v-menu-bar auto-open='' plain-text tabindex=5> "
+ "<menu>File"
+ "<menu>Save</menu>"
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>"
- + "<menu separator='true' />"
- + "<menu disabled='true'>Exit</menu>"
+ + "<menu separator='' />"
+ + "<menu disabled=''>Exit</menu>"
+ "<menu visible='false'>Not for everybody</menu>"
+ "</menu>"
+ "<menu description=\"This contains many items in sub menus\">Other"
+ "<menu style-name=\"fancy\">Sub"
- + "<menu checkable='true' checked='true'>Option 1 - no <b>html</b></menu>"
- + "<menu checkable='true'>Option 2</menu>"
- + "<menu checkable='true'>Option 3</menu>" //
+ + "<menu checkable='' checked=''>Option 1 - no <b>html</b></menu>"
+ + "<menu checkable=''>Option 2</menu>"
+ + "<menu checkable=''>Option 3</menu>" //
+ "</menu>" //
+ "</menu>" //
+ "<menu more icon=\"theme://icon.png\">foo</menu>"
@@ -124,8 +124,7 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
+ "<menu><b>File</b>"
+ "<menu><font style=\"color: red\">Save</font></menu>"
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>"
- + "<menu separator='true' />"
- + "<menu disabled='true'>Exit</menu>" //
+ + "<menu separator='' />" + "<menu disabled=''>Exit</menu>" //
+ "</menu></v-menu-bar>";
MenuBar menuBar = new MenuBar();
menuBar.setHtmlContentAllowed(true);
diff --git a/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java b/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
index 83b3e577dc..1119301c55 100644
--- a/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
+++ b/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
@@ -29,7 +29,7 @@ public class AbstractComponentSetResponsiveTest extends
label.setContentMode(ContentMode.HTML);
label.setResponsive(true);
- String design = "<v-label responsive='true' />";
+ String design = "<v-label responsive='' />";
testWrite(design, label);
testRead(design, label);
diff --git a/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java b/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java
index 4115872fb7..85efa22c40 100644
--- a/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java
@@ -117,7 +117,7 @@ public class ComponentFactoryTest {
currentComponentFactory.set(new ComponentFactory() {
@Override
public Component createComponent(String fullyQualifiedClassName,
- DesignContext context) {
+ DesignContext context) {
classes.add(fullyQualifiedClassName);
return defaultFactory.createComponent(fullyQualifiedClassName,
context);
@@ -127,8 +127,10 @@ public class ComponentFactoryTest {
DesignContext designContext = new DesignContext();
designContext.getDefaultInstance(new DefaultInstanceTestComponent());
- Assert.assertEquals("There should be one class requests", 1, classes.size());
- Assert.assertEquals("First class should be DefaultInstanceTestComponent",
+ Assert.assertEquals("There should be one class requests", 1,
+ classes.size());
+ Assert.assertEquals(
+ "First class should be DefaultInstanceTestComponent",
DefaultInstanceTestComponent.class.getName(), classes.get(0));
}
diff --git a/server/tests/src/com/vaadin/tests/design/DesignFormatterTest.java b/server/tests/src/com/vaadin/tests/design/DesignFormatterTest.java
index 00af20ea8c..acee3e2ca8 100644
--- a/server/tests/src/com/vaadin/tests/design/DesignFormatterTest.java
+++ b/server/tests/src/com/vaadin/tests/design/DesignFormatterTest.java
@@ -78,7 +78,7 @@ public class DesignFormatterTest {
@Test
public void testBoolean() {
- assertEquals("true", formatter.format(true));
+ assertEquals("", formatter.format(true));
assertEquals("false", formatter.format(false));
assertEquals(true, formatter.parse("true", boolean.class));
diff --git a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
index 5f901cd746..d944826f10 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
@@ -40,7 +40,7 @@ public class ParseAllSupportedComponentsTest {
public void allComponentsAreParsed() throws FileNotFoundException {
DesignContext ctx = Design
.read(new FileInputStream(
- "server/tests/src/com/vaadin/tests/design/all-components.html"),
+ "server/tests/src/com/vaadin/tests/design/all-components.html"),
null);
assertThat(ctx, is(not(nullValue())));
diff --git a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
index 70376c79f8..50ab261195 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
@@ -138,7 +138,8 @@ public class ParseLayoutTest {
return Design.read(in, null);
}
- private ByteArrayOutputStream serializeDesign(DesignContext context) throws IOException {
+ private ByteArrayOutputStream serializeDesign(DesignContext context)
+ throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Design.write(context, out);
@@ -192,7 +193,8 @@ public class ParseLayoutTest {
assertThat(hlayout.getComponent(0).getCaption(), is("FooBar"));
assertThat(hlayout.getComponent(1).getCaption(), is("Native click me"));
assertThat(hlayout.getComponent(2).getCaption(), is("Another button"));
- assertThat(hlayout.getComponent(3).getCaption(), is("Yet another button"));
+ assertThat(hlayout.getComponent(3).getCaption(),
+ is("Yet another button"));
assertThat(hlayout.getComponent(4).getCaption(), is("Click me"));
assertThat(hlayout.getComponent(4).getWidth(), is(150f));
diff --git a/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java b/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java
index a5c7dc3ab2..91036c03ed 100644
--- a/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java
@@ -7,7 +7,8 @@ import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class AbstractContainerListenersTest extends AbstractListenerMethodsTestBase {
+public class AbstractContainerListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testItemSetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(IndexedContainer.class,
diff --git a/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java b/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java
index 28e6f7e0a5..fd38b52a37 100644
--- a/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java
@@ -8,7 +8,8 @@ import com.vaadin.data.util.AbstractProperty;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class AbstractPropertyListenersTest extends AbstractListenerMethodsTestBase {
+public class AbstractPropertyListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testValueChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(AbstractProperty.class,
ValueChangeEvent.class, ValueChangeListener.class,
diff --git a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java
index 18fbf70a2a..cd9beafa10 100644
--- a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java
+++ b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java
@@ -184,8 +184,8 @@ public class CsrfTokenMissingTest {
rpcRequest.getCsrfToken());
}
- private static Logger LOGGER = Logger
- .getLogger(CsrfTokenMissingTest.class.getName());
+ private static Logger LOGGER = Logger.getLogger(CsrfTokenMissingTest.class
+ .getName());
static {
LOGGER.setLevel(Level.ALL);
}
diff --git a/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java b/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java
index 2e1fa83540..594f5627dd 100644
--- a/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java
@@ -7,7 +7,8 @@ import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class IndexedContainerListenersTest extends AbstractListenerMethodsTestBase {
+public class IndexedContainerListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testValueChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(IndexedContainer.class,
ValueChangeEvent.class, ValueChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java b/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java
index 7edaa2826a..8a91ea1868 100644
--- a/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java
@@ -5,7 +5,8 @@ import com.vaadin.data.Item.PropertySetChangeListener;
import com.vaadin.data.util.PropertysetItem;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class PropertysetItemListenersTest extends AbstractListenerMethodsTestBase {
+public class PropertysetItemListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testPropertySetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(PropertysetItem.class,
PropertySetChangeEvent.class, PropertySetChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java b/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
index ec3754d037..4e8f987def 100644
--- a/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
+++ b/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
@@ -48,8 +48,8 @@ public abstract class AbstractListenerMethodsTestBase extends TestCase {
System.out.println("package " + packageName + ";");
System.out.println("import "
- + AbstractListenerMethodsTestBase.class.getName()
- + ";");
+ + AbstractListenerMethodsTestBase.class
+ .getName() + ";");
System.out.println("import " + c.getName() + ";");
System.out.println("public class "
+ c.getSimpleName()
diff --git a/server/tests/src/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java b/server/tests/src/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
index 9fcb64acca..42715e52ae 100644
--- a/server/tests/src/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
+++ b/server/tests/src/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
@@ -52,19 +52,19 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler
String s = "<" + componentTag + " ";
if (left && right && top && bottom) {
- s += "margin='true'";
+ s += "margin=''";
} else {
if (left) {
- s += "margin-left='true' ";
+ s += "margin-left='' ";
}
if (right) {
- s += "margin-right='true' ";
+ s += "margin-right='' ";
}
if (top) {
- s += "margin-top='true' ";
+ s += "margin-top='' ";
}
if (bottom) {
- s += "margin-bottom='true' ";
+ s += "margin-bottom='' ";
}
}
return s + " />";
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
index 062a89ad62..ece4b5f380 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
@@ -5,7 +5,8 @@ import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.AbsoluteLayout;
-public class AbsoluteLayoutListenersTest extends AbstractListenerMethodsTestBase {
+public class AbsoluteLayoutListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(AbsoluteLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
index 4f45168a32..71021a06e1 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
@@ -71,7 +71,7 @@ public class AbstractComponentDeclarativeTest extends
public void testProperties() {
String design = "<v-label id=\"testId\" primary-style-name=\"test-style\" "
+ "caption=\"test-caption\" locale=\"fi_FI\" description=\"test-description\" "
- + "error=\"<div>test-error</div>\" immediate=\"true\"/>";
+ + "error=\"<div>test-error</div>\" immediate=\"\"/>";
component.setId("testId");
component.setPrimaryStyleName("test-style");
component.setCaption("test-caption");
@@ -139,7 +139,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testSizeFull() {
- String design = "<v-label size-full=\"true\"/>";
+ String design = "<v-label size-full=\"\"/>";
component.setSizeFull();
testRead(design, component);
testWrite(design, component);
@@ -147,7 +147,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testSizeAuto() {
- String design = "<v-label size-auto=\"true\"/>";
+ String design = "<v-label size-auto=\"\"/>";
component.setSizeUndefined();
testRead(design, component);
testWrite(design, component);
@@ -155,7 +155,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testHeightFull() {
- String design = "<v-label height-full=\"true\"/ width=\"20px\"/>";
+ String design = "<v-label height-full=\"\"/ width=\"20px\"/>";
component.setHeight("100%");
component.setWidth("20px");
testRead(design, component);
@@ -164,7 +164,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testHeightAuto() {
- String design = "<v-horizontal-split-panel height-auto=\"true\"/ width=\"20px\" >";
+ String design = "<v-horizontal-split-panel height-auto=\"\"/ width=\"20px\" >";
// we need to have default height of 100% -> use split panel
AbstractComponent component = new HorizontalSplitPanel();
component.setHeight(null);
@@ -175,7 +175,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testWidthFull() {
- String design = "<v-button width-full=\"true\"/ height=\"20px\">Foo</button>";
+ String design = "<v-button width-full=\"\"/ height=\"20px\">Foo</button>";
AbstractComponent component = new Button();
component.setCaptionAsHtml(true);
component.setCaption("Foo");
@@ -187,7 +187,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testWidthAuto() {
- String design = "<v-label height=\"20px\"/ width-auto=\"true\"/>";
+ String design = "<v-label height=\"20px\"/ width-auto=\"\"/>";
component.setCaptionAsHtml(false);
component.setHeight("20px");
component.setWidth(null);
@@ -197,7 +197,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testResponsive() {
- String design = "<v-label responsive =\"true\"/>";
+ String design = "<v-label responsive =\"\"/>";
Responsive.makeResponsive(component);
testRead(design, component);
testWrite(design, component);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
index 55231e5494..b4afde5923 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
@@ -33,9 +33,9 @@ public class AbstractFieldDeclarativeTest extends
@Test
public void testPlainText() {
- String design = "<v-text-field buffered='true' validation-visible='false' invalid-committed='true'"
- + " invalid-allowed='false' required='true' required-error='This is a required field'"
- + " conversion-error='Input {0} cannot be parsed' tabindex=3 readonly='true'/>";
+ String design = "<v-text-field buffered='' validation-visible='false' invalid-committed=''"
+ + " invalid-allowed='false' required='' required-error='This is a required field'"
+ + " conversion-error='Input {0} cannot be parsed' tabindex=3 readonly=''/>";
AbstractField tf = new TextField();
tf.setBuffered(true);
tf.setBuffered(true);
@@ -51,7 +51,7 @@ public class AbstractFieldDeclarativeTest extends
testWrite(design, tf);
// Test with readonly=false
- design = design.replace("readonly='true'", "");
+ design = design.replace("readonly=''", "");
tf.setReadOnly(false);
testRead(design, tf);
testWrite(design, tf);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
index b3867a7a3a..b294ffad72 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
@@ -42,7 +42,7 @@ public class AbstractSelectDeclarativeTest extends
DeclarativeTestBase<AbstractSelect> {
public String getDesignSingleSelectNewItemsAllowed() {
- return "<v-combo-box new-items-allowed='true' item-caption-mode='icon_only'"
+ return "<v-combo-box new-items-allowed='' item-caption-mode='icon_only'"
+ " null-selection-item-id='nullIid'/>";
}
@@ -57,7 +57,7 @@ public class AbstractSelectDeclarativeTest extends
}
public String getDesignMultiSelect() {
- return "<v-list-select multi-select='true' null-selection-allowed='false' new-items-allowed='true' item-caption-mode='property' />";
+ return "<v-list-select multi-select='' null-selection-allowed='false' new-items-allowed='' item-caption-mode='property' />";
}
public AbstractSelect getExpectedMultiSelect() {
@@ -210,7 +210,7 @@ public class AbstractSelectDeclarativeTest extends
attributes.put("item-caption-mode", "property");
attributes.put("item-caption-property-id", "name");
attributes.put("item-icon-property-id", "icon");
- attributes.put("null-selection-allowed", "true");
+ attributes.put("null-selection-allowed", "");
attributes.put("null-selection-item-id", "No items selected");
return new Element(Tag.valueOf("v-combo-box"), "", attributes);
}
@@ -231,7 +231,7 @@ public class AbstractSelectDeclarativeTest extends
assertEquals("Wrong caption for the combo box.", "A combo box",
e.attr("caption"));
Assert.assertTrue("Adding new items should be allowed.",
- "true".equals(e.attr("new-items-allowed")));
+ "".equals(e.attr("new-items-allowed")));
assertEquals("Wrong item caption mode.", "icon_only",
e.attr("item-caption-mode"));
assertEquals("Wrong item icon property id.", "icon",
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
index 8ec0414e03..ee806cb5f7 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
@@ -7,7 +7,8 @@ import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.ComboBox;
-public class AbstractSelectListenersTest extends AbstractListenerMethodsTestBase {
+public class AbstractSelectListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testItemSetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(ComboBox.class, ItemSetChangeEvent.class,
ItemSetChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java
index 4d75e0b59f..efcdc3e997 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java
@@ -111,7 +111,7 @@ public class OptionGroupDeclarativeTests extends
//@formatter:off
String expected =
- "<v-option-group html-content-allowed='true'>"
+ "<v-option-group html-content-allowed=''>"
+ "<option item-id=\"foo\"><b>True</b></option>"
+ "<option item-id=\"bar\"><font color='red'>False</font></option>"
+ "<option>baz</option>"
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
index 2d6db6d19a..11d97d191b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
@@ -38,7 +38,7 @@ public class AbstractSplitPanelDeclarativeTest extends
@Test
public void testWithBothChildren() {
String design = "<v-horizontal-split-panel split-position=20.5% "
- + "min-split-position=20% max-split-position=50px locked=true "
+ + "min-split-position=20% max-split-position=50px locked='' "
+ "reversed=\"\"> <v-table /> <v-vertical-layout />"
+ "</v-horizontal-split-panel>";
AbstractSplitPanel sp = new HorizontalSplitPanel();
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
index a3594b7159..b8e570bc89 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
@@ -34,7 +34,7 @@ public class AbstractTextFieldDeclarativeTest extends
@Test
public void testAttributes() {
String design = "<v-text-field null-representation=this-is-null "
- + "null-setting-allowed=true maxlength=5 columns=3 "
+ + "null-setting-allowed='' maxlength=5 columns=3 "
+ "input-prompt=input text-change-event-mode=eager "
+ "text-change-timeout=100 />";
AbstractTextField tf = new TextField();
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
index 1b7f4fdce1..0896b5d649 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
@@ -9,7 +9,8 @@ import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.TextField;
-public class AbstractTextFieldListenersTest extends AbstractListenerMethodsTestBase {
+public class AbstractTextFieldListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testTextChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(TextField.class, TextChangeEvent.class,
TextChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
index 4390499c4e..ec2b5241f3 100644
--- a/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
@@ -43,7 +43,7 @@ public class AudioDeclarativeTest extends DeclarativeTestBase<Audio> {
@Test
public void testAudioMultipleSources() {
- String design = "<v-audio muted='true' show-controls='false'>"
+ String design = "<v-audio muted='' show-controls='false'>"
+ "some <b>text</b>" //
+ "<source href='http://foo.pl' />"
+ "<source href='https://bar.pl' />" //
diff --git a/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
index fc0b3d9512..5be70bd2db 100644
--- a/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
@@ -36,7 +36,7 @@ public class VideoDeclarativeTest extends DeclarativeTestBase<Video> {
@Test
public void testVideoMultipleSources() {
- String design = "<v-video muted='true' show-controls='false'>"
+ String design = "<v-video muted='' show-controls='false'>"
+ "some <b>text</b>" //
+ "<source href='http://foo.pl' />"
+ "<source href='https://bar.pl' />" //
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
index 6162e41494..e0f0b7c3e9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
@@ -38,7 +38,7 @@ public class CheckboxDeclarativeTest extends DeclarativeTestBase<CheckBox> {
@Test
public void testUnchecked() {
- String design = "<v-check-box checked='true' />";
+ String design = "<v-check-box checked='' />";
CheckBox checkBox = new CheckBox();
checkBox.setValue(true);
testRead(design, checkBox);
diff --git a/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
index 59b2efdc42..33521d3af2 100644
--- a/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
@@ -29,7 +29,7 @@ public class AbstractColorPickerDeclarativeTest extends
@Test
public void testAllAbstractColorPickerFeatures() {
- String design = "<v-color-picker color='#fafafa' default-caption-enabled='true' position='100,100'"
+ String design = "<v-color-picker color='#fafafa' default-caption-enabled='' position='100,100'"
+ " popup-style='simple' rgb-visibility='false' hsv-visibility='false'"
+ " history-visibility=false textfield-visibility=false />";
ColorPicker colorPicker = new ColorPicker();
@@ -58,7 +58,7 @@ public class AbstractColorPickerDeclarativeTest extends
@Test
public void testAllAbstractColorPickerAreaFeatures() {
- String design = "<v-color-picker-area color='#fafafa' default-caption-enabled='true' position='100,100'"
+ String design = "<v-color-picker-area color='#fafafa' default-caption-enabled='' position='100,100'"
+ " popup-style='simple' rgb-visibility='false' hsv-visibility='false'"
+ " history-visibility=false textfield-visibility=false />";
AbstractColorPicker colorPicker = new ColorPickerArea();
diff --git a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
index 5058cf5a5f..4087f1ad11 100644
--- a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
@@ -44,7 +44,7 @@ public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> {
}
private String getTimezoneDesign() {
- return "<v-date-field range-start=\"2014-05-05 00:00:00+0300\" range-end=\"2014-06-05 00:00:00+0300\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient='true' show-iso-week-numbers='true' parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00+0300\"/>";
+ return "<v-date-field range-start=\"2014-05-05 00:00:00+0300\" range-end=\"2014-06-05 00:00:00+0300\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient='' show-iso-week-numbers='' parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00+0300\"/>";
}
private DateField getTimezoneExpected() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
index 6cf9ef55ad..aa9a499469 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
@@ -25,11 +25,11 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
public void testSimpleGridColumns() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true width='100' property-id='Column1'>"
+ + " <col sortable='' width='100' property-id='Column1'>"
+ " <col sortable=false max-width='200' expand='2' property-id='Column2'>"
- + " <col sortable=true editable=false min-width='15' expand='1' property-id='Column3'>"
- + " <col sortable=true hidable=true hiding-toggle-caption='col 4' property-id='Column4'>"
- + " <col sortable=true hidden=true property-id='Column5'>"
+ + " <col sortable='' editable=false min-width='15' expand='1' property-id='Column3'>"
+ + " <col sortable='' hidable='' hiding-toggle-caption='col 4' property-id='Column4'>"
+ + " <col sortable='' hidden='' property-id='Column5'>"
+ "</colgroup>" //
+ "<thead />" //
+ "</table></v-grid>";
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
index 8ffe749f6f..43f394eafc 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
@@ -37,8 +37,8 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> {
@Test
public void testBasicAttributes() {
- String design = "<v-grid editable='true' rows=20 frozen-columns=-1 "
- + "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta' column-reordering-allowed=true>";
+ String design = "<v-grid editable='' rows=20 frozen-columns=-1 "
+ + "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta' column-reordering-allowed=''>";
Grid grid = new Grid();
grid.setEditorEnabled(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
index b4e82950cb..8e1d880c5e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
@@ -30,12 +30,12 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testSingleDefaultHeader() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
- + " <col sortable=true property-id='Column2'>"
- + " <col sortable=true property-id='Column3'>"
+ + " <col sortable='' property-id='Column1'>"
+ + " <col sortable='' property-id='Column2'>"
+ + " <col sortable='' property-id='Column3'>"
+ "</colgroup>" //
+ "<thead>" //
- + " <tr default='true'><th plain-text=''>Column1<th plain-text=''>Column2<th plain-text=''>Column3</tr>" //
+ + " <tr default=''><th plain-text=''>Column1<th plain-text=''>Column2<th plain-text=''>Column3</tr>" //
+ "</thead>" //
+ "</table></v-grid>";
Grid grid = new Grid();
@@ -51,12 +51,11 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testSingleDefaultHTMLHeader() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
- + " <col sortable=true property-id='Column2'>"
- + " <col sortable=true property-id='Column3'>"
- + "</colgroup>" //
+ + " <col sortable='' property-id='Column1'>"
+ + " <col sortable='' property-id='Column2'>"
+ + " <col sortable='' property-id='Column3'>" + "</colgroup>" //
+ "<thead>" //
- + " <tr default='true'><th>Column1<th>Column2<th>Column3</tr>" //
+ + " <tr default=''><th>Column1<th>Column2<th>Column3</tr>" //
+ "</thead>" //
+ "</table></v-grid>";
Grid grid = new Grid();
@@ -77,7 +76,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testNoHeaderRows() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
+ + " <col sortable='' property-id='Column1'>"
+ "</colgroup>" //
+ "<thead />" //
+ "</table></v-grid>";
@@ -94,13 +93,13 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testMultipleHeadersWithColSpans() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
- + " <col sortable=true property-id='Column2'>"
- + " <col sortable=true property-id='Column3'>"
+ + " <col sortable='' property-id='Column1'>"
+ + " <col sortable='' property-id='Column2'>"
+ + " <col sortable='' property-id='Column3'>"
+ "</colgroup>" //
+ "<thead>" //
+ " <tr><th colspan=3>Baz</tr>"
- + " <tr default='true'><th>Column1<th>Column2<th>Column3</tr>" //
+ + " <tr default=''><th>Column1<th>Column2<th>Column3</tr>" //
+ " <tr><th>Foo<th colspan=2>Bar</tr>" //
+ "</thead>" //
+ "</table></v-grid>";
@@ -128,9 +127,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testSingleDefaultFooter() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
- + " <col sortable=true property-id='Column2'>"
- + " <col sortable=true property-id='Column3'>"
+ + " <col sortable='' property-id='Column1'>"
+ + " <col sortable='' property-id='Column2'>"
+ + " <col sortable='' property-id='Column3'>"
+ "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tfoot>" //
@@ -157,10 +156,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testSingleDefaultHTMLFooter() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
- + " <col sortable=true property-id='Column2'>"
- + " <col sortable=true property-id='Column3'>"
- + "</colgroup>" //
+ + " <col sortable='' property-id='Column1'>"
+ + " <col sortable='' property-id='Column2'>"
+ + " <col sortable='' property-id='Column3'>" + "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tfoot>" //
+ " <tr><td>Column1<td>Column2<td>Column3</tr>" //
@@ -186,9 +184,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testMultipleFootersWithColSpans() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
- + " <col sortable=true property-id='Column2'>"
- + " <col sortable=true property-id='Column3'>"
+ + " <col sortable='' property-id='Column1'>"
+ + " <col sortable='' property-id='Column2'>"
+ + " <col sortable='' property-id='Column3'>"
+ "</colgroup>" //
+ "<thead />" // No headers read or written.
+ "<tfoot>" //
@@ -223,10 +221,10 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testComponentInGridHeader() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
+ + " <col sortable='' property-id='Column1'>"
+ "</colgroup>" //
+ "<thead>" //
- + "<tr default=true><th><v-label><b>Foo</b></v-label></tr>"
+ + "<tr default=''><th><v-label><b>Foo</b></v-label></tr>"
+ "</thead>"//
+ "</table></v-grid>";
@@ -245,7 +243,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
public void testComponentInGridFooter() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Column1'>"
+ + " <col sortable='' property-id='Column1'>"
+ "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tfoot>" //
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
index fefd49a587..d7feb4aa70 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
@@ -25,7 +25,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
public void testSimpleInlineData() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Col1' />"
+ + " <col sortable='' property-id='Col1' />"
+ "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tbody>" //
@@ -51,9 +51,9 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
public void testMultipleColumnsInlineData() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Col1' />"
- + " <col sortable=true property-id='Col2' />"
- + " <col sortable=true property-id='Col3' />" //
+ + " <col sortable='' property-id='Col1' />"
+ + " <col sortable='' property-id='Col2' />"
+ + " <col sortable='' property-id='Col3' />" //
+ "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tbody>" //
@@ -79,9 +79,9 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
public void testMultipleColumnsInlineDataReordered() {
String design = "<v-grid><table>"//
+ "<colgroup>"
- + " <col sortable=true property-id='Col2' />"
- + " <col sortable=true property-id='Col3' />"
- + " <col sortable=true property-id='Col1' />" //
+ + " <col sortable='' property-id='Col2' />"
+ + " <col sortable='' property-id='Col3' />"
+ + " <col sortable='' property-id='Col1' />" //
+ "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tbody>" //
diff --git a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
index 9d3b5001da..d69fd92984 100644
--- a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
@@ -203,4 +203,37 @@ public class GridLayoutDeclarativeTest extends
}
return result;
}
+
+ @Test
+ public void testNestedGridLayouts() {
+ String design = "<!DOCTYPE html>" + //
+ "<html>" + //
+ " <body> " + //
+ " <v-grid-layout> " + //
+ " <row> " + //
+ " <column> " + //
+ " <v-grid-layout> " + //
+ " <row> " + //
+ " <column> " + //
+ " <v-button>" + //
+ " Button " + //
+ " </v-button> " + //
+ " </column> " + //
+ " </row> " + //
+ " </v-grid-layout> " + //
+ " </column> " + //
+ " </row> " + //
+ " </v-grid-layout> " + //
+ " </body>" + //
+ "</html>";
+ GridLayout outer = new GridLayout();
+ GridLayout inner = new GridLayout();
+ Button b = new Button("Button");
+ b.setCaptionAsHtml(true);
+ inner.addComponent(b);
+ outer.addComponent(inner);
+ testRead(design, outer);
+ testWrite(design, outer);
+
+ }
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
index 8bad68f5b9..1b50a517ae 100644
--- a/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
@@ -48,7 +48,7 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> {
component.setHideOnMouseOut(true);
component.setPopupVisible(true);
// hide-on-mouse-out is true by default. not seen in design
- String design = "<v-popup-view popup-visible='true'>" //
+ String design = "<v-popup-view popup-visible=''>" //
+ "Click <u>here</u> to open"
+ "<popup-content>"
+ new DesignContext().createElement(verticalLayout)
diff --git a/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
index c98883a4a7..bed19644ff 100644
--- a/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
@@ -29,7 +29,7 @@ public class ProgressBarDeclarativeTest extends
DeclarativeTestBase<ProgressBar> {
public String getBasicDesign() {
- return "<v-progress-bar value=0.5 indeterminate='true'>";
+ return "<v-progress-bar value=0.5 indeterminate=''>";
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
index 9d61656801..0d614b7b9a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
@@ -24,7 +24,7 @@ public class RichTextAreaDeclarativeTest extends
DeclarativeTestBase<RichTextArea> {
private String getBasicDesign() {
- return "<v-rich-text-area null-representation='' null-setting-allowed='true'>\n"
+ return "<v-rich-text-area null-representation='' null-setting-allowed=''>\n"
+ "\n <b>Header</b> <br/>Some text\n "
+ "</v-rich-text-area>";
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java b/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java
index 7f20f29648..8c093fdf72 100644
--- a/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java
@@ -88,7 +88,7 @@ public class SliderTest {
@Test
public void valuesGreaterThanIntMaxValueCanBeUsed() {
- double minValue = (double)Integer.MAX_VALUE + 1;
+ double minValue = (double) Integer.MAX_VALUE + 1;
Slider s = new Slider(minValue, minValue + 1, 0);
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java b/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
index 5e33ff2f4a..69aaf2e3a9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
@@ -26,8 +26,8 @@ public class TableColumnAlignmentsTest {
@Test
public void explicitColumnAlignments() {
int properties = 5;
- Table t = TableGeneratorTest
- .createTableWithDefaultContainer(properties, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(
+ properties, 10);
Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
@@ -122,8 +122,8 @@ public class TableColumnAlignmentsTest {
@Test
public void explicitColumnAlignmentOneByOne() {
int properties = 5;
- Table t = TableGeneratorTest
- .createTableWithDefaultContainer(properties, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(
+ properties, 10);
Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTest.java
index c395d8501c..3de5ae0524 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTest.java
@@ -38,10 +38,10 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
String design = "<"
+ getTag()
- + " page-length=30 cache-rate=3 selectable=true editable=true "
+ + " page-length=30 cache-rate=3 selectable='' editable='' "
+ "sortable=false sort-ascending=false sort-container-property-id=foo "
+ "drag-mode=row multi-select-mode=simple column-header-mode=id row-header-mode=id "
- + "column-reordering-allowed=true column-collapsing-allowed=true />";
+ + "column-reordering-allowed='' column-collapsing-allowed='' />";
Table table = getTable();
table.setPageLength(30);
@@ -69,12 +69,12 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
public void testColumns() {
String design = "<"
+ getTag()
- + " column-collapsing-allowed=true>" //
+ + " column-collapsing-allowed=''>" //
+ " <table>" //
+ " <colgroup>"
+ " <col property-id='foo' width=300>"
+ " <col property-id='bar' center expand=1 collapsible=false>"
- + " <col property-id='baz' right expand=2 collapsed=true>"
+ + " <col property-id='baz' right expand=2 collapsed=''>"
+ " </colgroup>" //
+ " </table>";
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
index a92101f550..c218f93a02 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
@@ -36,7 +36,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
@Test
public void testFeatures() {
String design = "<v-tab-sheet tabindex=5><tab caption=test-caption "
- + "visible=false closable=true enabled=false icon=http://www.vaadin.com/test.png"
+ + "visible=false closable='' enabled=false icon=http://www.vaadin.com/test.png"
+ " icon-alt=OK description=test-desc style-name=test-style "
+ "id=test-id><v-text-field/></tab></v-tab-sheet>";
TabSheet ts = new TabSheet();
@@ -59,7 +59,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
@Test
public void testSelected() {
- String design = "<v-tab-sheet><tab selected=true><v-text-field/></tab></v-tab-sheet>";
+ String design = "<v-tab-sheet><tab selected=''><v-text-field/></tab></v-tab-sheet>";
TabSheet ts = new TabSheet();
TextField tf = new TextField();
ts.addTab(tf);
@@ -71,7 +71,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
@Test
public void tabsNotShown() {
String design = "<v-tab-sheet tabs-visible=\"false\">\n"
- + " <tab caption=\"My Tab\" selected=\"true\">\n"
+ + " <tab caption=\"My Tab\" selected=\"\">\n"
+ " <v-label>My Content</v-label>\n" + " </tab>\n"
+ "</v-tab-sheet>\n";
TabSheet ts = new TabSheet();
@@ -84,4 +84,4 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
testWrite(design, ts);
}
-} \ No newline at end of file
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
index 5f487aa021..a30ca2a3ef 100644
--- a/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
@@ -33,7 +33,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
@Test
public void testAttributes() {
- String design = "<v-tree-table animations-enabled=true>";
+ String design = "<v-tree-table animations-enabled=''>";
TreeTable table = getTable();
table.setAnimationsEnabled(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
index be23a998a3..470f04c15c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
@@ -68,8 +68,8 @@ public class CustomUIClassLoaderTest extends TestCase {
private static DeploymentConfiguration createConfigurationMock() {
Properties properties = new Properties();
properties.put(VaadinSession.UI_PARAMETER, MyUI.class.getName());
- return new DefaultDeploymentConfiguration(CustomUIClassLoaderTest.class,
- properties);
+ return new DefaultDeploymentConfiguration(
+ CustomUIClassLoaderTest.class, properties);
}
private static VaadinRequest createRequestMock(ClassLoader classloader) {
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
index 1ab0011442..1d233af494 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
@@ -50,10 +50,10 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
public void testFeatures() {
String design = "<v-window position='100,100' window-mode='maximized' "
- + "center modal=true resizable=false resize-lazy=true closable=false draggable=false "
+ + "center modal='' resizable=false resize-lazy='' closable=false draggable=false "
+ "close-shortcut='ctrl-alt-escape' "
+ "assistive-prefix='Hello' assistive-postfix='World' assistive-role='alertdialog' "
- + "tab-stop-enabled=true "
+ + "tab-stop-enabled='' "
+ "tab-stop-top-assistive-text='Do not move above the window' "
+ "tab-stop-bottom-assistive-text='End of window'>"
+ "</v-window>";
diff --git a/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java b/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java
index 8a01464180..eb07fae07f 100644
--- a/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java
+++ b/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java
@@ -67,14 +67,14 @@ public class RendererTest {
@Override
public TestBean convertToModel(String value,
- Class<? extends TestBean> targetType, Locale locale)
+ Class<? extends TestBean> targetType, Locale locale)
throws ConversionException {
return null;
}
@Override
public String convertToPresentation(TestBean value,
- Class<? extends String> targetType, Locale locale)
+ Class<? extends String> targetType, Locale locale)
throws ConversionException {
if (value instanceof ExtendedBean) {
return "ExtendedBean(" + value.i + ", "
@@ -227,21 +227,27 @@ public class RendererTest {
assertEquals("", dateColumn.getRenderer().encode(null).asString());
assertEquals("", buttonColumn.getRenderer().encode(null).asString());
}
- @Test
+ @Test
public void testNullEncodingWithDefault() {
textColumn.setRenderer(new TextRenderer("default value"));
htmlColumn.setRenderer(new HtmlRenderer("default value"));
- numberColumn.setRenderer(new NumberRenderer("%s", Locale.getDefault(), "default value"));
+ numberColumn.setRenderer(new NumberRenderer("%s", Locale.getDefault(),
+ "default value"));
dateColumn.setRenderer(new DateRenderer("%s", "default value"));
buttonColumn.setRenderer(new ButtonRenderer("default value"));
- assertEquals("default value", textColumn.getRenderer().encode(null).asString());
- assertEquals("default value", htmlColumn.getRenderer().encode(null).asString());
- assertEquals("default value", numberColumn.getRenderer().encode(null).asString());
- assertEquals("default value", dateColumn.getRenderer().encode(null).asString());
- assertEquals("default value", buttonColumn.getRenderer().encode(null).asString());
+ assertEquals("default value", textColumn.getRenderer().encode(null)
+ .asString());
+ assertEquals("default value", htmlColumn.getRenderer().encode(null)
+ .asString());
+ assertEquals("default value", numberColumn.getRenderer().encode(null)
+ .asString());
+ assertEquals("default value", dateColumn.getRenderer().encode(null)
+ .asString());
+ assertEquals("default value", buttonColumn.getRenderer().encode(null)
+ .asString());
}
private TestConverter converter() {