Project

General

Profile

« Previous | Next » 

Revision 8f035267

Added by Andreas Kohlbecker about 5 years ago

fix #8071 setting newly created inReference as value for inReference combobox

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java
39 39
import eu.etaxonomy.cdm.vaadin.component.CdmBeanItemContainerFactory;
40 40
import eu.etaxonomy.cdm.vaadin.event.EditorActionTypeFilter;
41 41
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent;
42
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent.Type;
42 43
import eu.etaxonomy.cdm.vaadin.event.InstitutionEditorAction;
43 44
import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction;
44 45
import eu.etaxonomy.cdm.vaadin.event.ToOneRelatedEntityButtonUpdater;
......
272 273
       if(boundTargetField != null){
273 274
           if(boundTargetField.matchesPropertyIdPath("inReference")){
274 275
               if(event.isCreateOrModifiedType()){
275
                   getCache().load(event.getEntity());
276
                   Reference inReference = (Reference)getCache().load(event.getEntity());
276 277
                   getView().getInReferenceCombobox().reload();
278
                   if(event.getType() == Type.CREATED){
279
                       getView().getInReferenceCombobox().setValue(inReference);
280
                   }
277 281
               }
278 282
               if(event.isRemovedType()){
279 283
                   getView().getInReferenceCombobox().selectNewItem(null);

Also available in: Unified diff