Revision 9fec29e5
Added by Andreas Kohlbecker over 5 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/event/ToOneRelatedEntityReloader.java | ||
---|---|---|
80 | 80 |
((EntitySupport)toOneRelatedEntityField).replaceEntityValue(cachedEntity); |
81 | 81 |
} else { |
82 | 82 |
toOneRelatedEntityField.removeValueChangeListener(this); |
83 |
// TODO it would be better to add this as ValueChangeListener to the PropertyDataSource directly instead of listenting at the Field |
|
84 |
boolean readOnly = toOneRelatedEntityField.getPropertyDataSource().isReadOnly(); |
|
85 |
toOneRelatedEntityField.getPropertyDataSource().setReadOnly(false); |
|
86 | 83 |
toOneRelatedEntityField.setValue(null); // reset to trick equals check in vaadin |
87 | 84 |
toOneRelatedEntityField.setValue(cachedEntity); |
88 |
toOneRelatedEntityField.getPropertyDataSource().setReadOnly(readOnly); |
|
89 | 85 |
toOneRelatedEntityField.addValueChangeListener(this); |
90 | 86 |
} |
91 | 87 |
onSettingReloadedEntity = false; |
Also available in: Unified diff
Revert "fix #7586 temporarily setting the datasource readOnly state to false when relpacing the loaded with the cached entity"
This reverts commit bbdd609fd9f9a504f0225c98ce01c8f4b19931f9.