diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-10-21 20:41:05 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-10-22 08:00:22 +0000 |
commit | 3608ffaa74650e4669d997cfd08c315082bf310f (patch) | |
tree | 015915a031d296a96091e30c4d461297f51e148f /server/src/com/vaadin/data | |
parent | 8ac2039ac9c518ff512e5e7e983e01a9c6c1fc2f (diff) | |
download | vaadin-framework-3608ffaa74650e4669d997cfd08c315082bf310f.tar.gz vaadin-framework-3608ffaa74650e4669d997cfd08c315082bf310f.zip |
FieldGroup should not throw NPE when data source is not set (#14901).
Change-Id: I74bea857306fac5123aa86cdabc70d81c2a72094
Diffstat (limited to 'server/src/com/vaadin/data')
-rw-r--r-- | server/src/com/vaadin/data/fieldgroup/FieldGroup.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java index c5aab5a053..6f3a67a92a 100644 --- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java @@ -211,7 +211,8 @@ public class FieldGroup implements Serializable { public void setReadOnly(boolean fieldsReadOnly) { readOnly = fieldsReadOnly; for (Field<?> field : getFields()) { - if (!field.getPropertyDataSource().isReadOnly()) { + if (field.getPropertyDataSource() == null + || !field.getPropertyDataSource().isReadOnly()) { field.setReadOnly(fieldsReadOnly); } else { field.setReadOnly(true); |