summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-05-16 13:13:34 +0300
committerHenri Sara <henri.sara@gmail.com>2017-05-16 15:35:17 +0300
commit16b37b6011395b50710078d4693d58d1ce58f173 (patch)
treed19b9e02cad342d4f6cb48024b7501b024ad1e93 /server
parent75be04cfb516da4f395a18713a7549c0276c1714 (diff)
downloadvaadin-framework-16b37b6011395b50710078d4693d58d1ce58f173.tar.gz
vaadin-framework-16b37b6011395b50710078d4693d58d1ce58f173.zip
Fix code review comments
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java4
-rw-r--r--server/src/main/java/com/vaadin/ui/TreeGrid.java19
2 files changed, 16 insertions, 7 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 24f9b9cddd..463e475a44 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -3935,6 +3935,8 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
* Each member in the list of value providers corresponds to a column in the
* grid.
*
+ * @since 8.1
+ *
* @param body
* the element to read data from
* @param providers
@@ -3997,6 +3999,8 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
* {@link DesignContext#shouldWriteData(Component)} returns {@code true} for
* the grid that is being written.
*
+ * @since 8.1
+ *
* @param body
* the body element to write the declarative representation of
* data to
diff --git a/server/src/main/java/com/vaadin/ui/TreeGrid.java b/server/src/main/java/com/vaadin/ui/TreeGrid.java
index 54e8e10a6c..e526f3b7cd 100644
--- a/server/src/main/java/com/vaadin/ui/TreeGrid.java
+++ b/server/src/main/java/com/vaadin/ui/TreeGrid.java
@@ -93,7 +93,10 @@ public class TreeGrid<T> extends Grid<T>
/**
* Creates a new {@code TreeGrid} using the given
- * {@code HierarchicalDataProvider}.
+ * {@code HierarchicalDataProvider}, without support for creating columns
+ * based on property names. Use an alternative constructor, such as
+ * {@link TreeGrid#TreeGrid(Class)}, to create a {@code TreeGrid} that
+ * automatically sets up columns based on the type of presented data.
*
* @param dataProvider
* the data provider, not {@code null}
@@ -104,7 +107,11 @@ public class TreeGrid<T> extends Grid<T>
}
/**
- * Creates a {@code TreeGrid} using the given in-memory data.
+ * Creates a {@code TreeGrid} using the given in-memory data, without
+ * support for creating columns based on property names. Use an alternative
+ * constructor, such as {@link TreeGrid#TreeGrid(Class)}, to create a
+ * {@code TreeGrid} that automatically sets up columns based on the type of
+ * presented data.
*
* @see TreeData
*
@@ -117,8 +124,8 @@ public class TreeGrid<T> extends Grid<T>
}
/**
- * Creates a grid using a custom {@link PropertySet} implementation and
- * custom data communicator.
+ * Creates a {@code TreeGrid} using a custom {@link PropertySet}
+ * implementation and custom data communicator.
* <p>
* Property set is used for configuring the initial columns and resolving
* property names for {@link #addColumn(String)} and
@@ -305,9 +312,7 @@ public class TreeGrid<T> extends Grid<T>
if (getColumn(id) == null) {
throw new IllegalArgumentException("No column found for given id");
}
- getColumn(id).setHidden(false);
- getColumn(id).setHidable(false);
- getState().hierarchyColumnId = getInternalIdForColumn(getColumn(id));
+ setHierarchyColumn(getColumn(id));
}
/**