summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2016-04-11 14:56:14 +0300
committerVaadin Code Review <review@vaadin.com>2016-04-28 12:56:28 +0000
commit20f012cb6998ed276c333eab67f8b7227df23b12 (patch)
treea334225d1cffe4b65b910c33f165097aa8d5620e /server
parent46556f9dbbdff6cfbf2b3e689c566e041c741cdf (diff)
downloadvaadin-framework-20f012cb6998ed276c333eab67f8b7227df23b12.tar.gz
vaadin-framework-20f012cb6998ed276c333eab67f8b7227df23b12.zip
Clarify error message for column mismatches (#18323)
Change-Id: I94b0819b68dbdda96fb1036e503bf63390a800d7
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 036fe8b756..388d74aeee 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -4855,12 +4855,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
/**
- * Sets the grid data source.<p>
+ * Sets the grid data source.
+ * <p>
*
- * <strong>Note</strong> Grid columns are based on properties and try to detect a correct converter for
- * the data type. The columns are not reinitialized automatically if the container is changed, and if the same
+ * <strong>Note</strong> Grid columns are based on properties and try to
+ * detect a correct converter for the data type. The columns are not
+ * reinitialized automatically if the container is changed, and if the same
* properties are present after container change, the columns are reused.
- * Properties with same names, but different data types will lead to unpredictable behaviour.
+ * Properties with same names, but different data types will lead to
+ * unpredictable behaviour.
*
* @param container
* The container data source. Cannot be null.
@@ -4988,7 +4991,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
+ property
+ " with the header \""
+ getColumn(property).getHeaderCaption()
- + "\"");
+ + "\". "
+ + "Call removeAllColumns() before setContainerDataSource() if you want to reconfigure the columns based on the new container.");
}
if (!(datasource instanceof Sortable)