summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2014-10-21 20:41:05 +0300
committerVaadin Code Review <review@vaadin.com>2014-10-22 08:00:22 +0000
commit3608ffaa74650e4669d997cfd08c315082bf310f (patch)
tree015915a031d296a96091e30c4d461297f51e148f /server/src/com/vaadin/data
parent8ac2039ac9c518ff512e5e7e983e01a9c6c1fc2f (diff)
downloadvaadin-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.java3
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);