aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/components
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-02-01 15:30:57 +0200
committerPekka Hyvönen <pekka@vaadin.com>2017-02-01 15:30:57 +0200
commit953e7212d84619332cba22888aa653462f9c1706 (patch)
tree08ff65e0d812dc507dcf816c5c49743256eeff23 /server/src/main/java/com/vaadin/ui/components
parent38b475330868d2d7b0d0b2da0a14be4040ca89ae (diff)
downloadvaadin-framework-953e7212d84619332cba22888aa653462f9c1706.tar.gz
vaadin-framework-953e7212d84619332cba22888aa653462f9c1706.zip
Make Grid add columns based on bean properties (#8392)
* Make Grid add columns based on bean properties The property set concept used for Binder is slightly generalized and used by Grid as well to support similar functionality. Fixes vaadin/framework8-issues#250
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/components')
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java b/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java
index a001a5026a..dae7c61ee7 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java
@@ -27,6 +27,7 @@ import com.vaadin.data.Binder;
import com.vaadin.data.Binder.Binding;
import com.vaadin.data.BinderValidationStatus;
import com.vaadin.data.BinderValidationStatusHandler;
+import com.vaadin.data.PropertySet;
import com.vaadin.shared.ui.grid.editor.EditorClientRpc;
import com.vaadin.shared.ui.grid.editor.EditorServerRpc;
import com.vaadin.shared.ui.grid.editor.EditorState;
@@ -112,8 +113,11 @@ public class EditorImpl<T> extends AbstractGridExtension<T>
/**
* Constructor for internal implementation of the Editor.
+ *
+ * @param propertySet
+ * the property set to use for configuring the default binder
*/
- public EditorImpl() {
+ public EditorImpl(PropertySet<T> propertySet) {
rpc = getRpcProxy(EditorClientRpc.class);
registerRpc(new EditorServerRpc() {
@@ -142,7 +146,7 @@ public class EditorImpl<T> extends AbstractGridExtension<T>
}
});
- setBinder(new Binder<>());
+ setBinder(Binder.withPropertySet(propertySet));
}
@Override