aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data/util/AbstractBeanContainer.java
diff options
context:
space:
mode:
authorMatti Hosio <mhosio@vaadin.com>2014-12-17 10:31:33 +0200
committerMatti Hosio <mhosio@vaadin.com>2014-12-17 10:31:33 +0200
commite547f024533bef83b8c8c8e522240f34765c894d (patch)
tree4610ad629b996df6d7882a8f9190922a467046d2 /server/src/com/vaadin/data/util/AbstractBeanContainer.java
parent8a0a1bdb4630f39214a039a2689bfa5a1431a413 (diff)
parenta9f24b00e9ddcd5ca19ac2907e0bf2413f036af4 (diff)
downloadvaadin-framework-e547f024533bef83b8c8c8e522240f34765c894d.tar.gz
vaadin-framework-e547f024533bef83b8c8c8e522240f34765c894d.zip
Merge remote-tracking branch 'origin/master' into declarative
Conflicts: server/src/com/vaadin/ui/TextField.java Change-Id: I289cb9ec80d494ab79aec11a43708abf5b403a00
Diffstat (limited to 'server/src/com/vaadin/data/util/AbstractBeanContainer.java')
-rw-r--r--server/src/com/vaadin/data/util/AbstractBeanContainer.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/src/com/vaadin/data/util/AbstractBeanContainer.java b/server/src/com/vaadin/data/util/AbstractBeanContainer.java
index adf6313770..fad0934e53 100644
--- a/server/src/com/vaadin/data/util/AbstractBeanContainer.java
+++ b/server/src/com/vaadin/data/util/AbstractBeanContainer.java
@@ -152,7 +152,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
* A description of the properties found in beans of type {@link #type}.
* Determines the property ids that are present in the container.
*/
- private LinkedHashMap<String, VaadinPropertyDescriptor<BEANTYPE>> model;
+ private final LinkedHashMap<String, VaadinPropertyDescriptor<BEANTYPE>> model;
/**
* Constructs a {@code AbstractBeanContainer} for beans of the given type.
@@ -178,7 +178,11 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
*/
@Override
public Class<?> getType(Object propertyId) {
- return model.get(propertyId).getPropertyType();
+ VaadinPropertyDescriptor<BEANTYPE> descriptor = model.get(propertyId);
+ if (descriptor == null) {
+ return null;
+ }
+ return descriptor.getPropertyType();
}
/**
@@ -876,7 +880,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
model.put(qualifiedPropertyId, pd);
model.remove(propertyId);
for (BeanItem<BEANTYPE> item : itemIdToItem.values()) {
- item.addItemProperty(propertyId,
+ item.addItemProperty(qualifiedPropertyId,
pd.createProperty(item.getBean()));
item.removeItemProperty(propertyId);
}