Project

General

Profile

Revision 2c04b7fb

ID2c04b7fbc95d14a0508a92a32fa6b3ae0a3c3da9
Parent 8ccf2acc
Child 2584f7d2

Added by Katja Luther over 2 years ago

events for name editor need to handle the related taxon

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
55 55
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
56 56
import eu.etaxonomy.cdm.model.common.CdmBase;
57 57
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
58
import eu.etaxonomy.cdm.model.name.TaxonName;
58 59
import eu.etaxonomy.cdm.model.taxon.Taxon;
59 60
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
60 61
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
......
712 713

  
713 714
    @Inject
714 715
    @Optional
715
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_NAME_EDITOR)boolean refresh){
716
        if(refresh){
716
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_NAME_EDITOR)CdmBase cdmbase){
717
        if(cdmbase.equals(this.taxon) ){
717 718
            this.redraw(false, false, false, true);
719
            this.setDirty();
718 720

  
719

  
721
        }else if (cdmbase instanceof TaxonName){
722
            if (((TaxonName)cdmbase).equals(taxon.getName())){
723
                this.redraw(false, false, false, true);
724
                this.setDirty();
725
            }
720 726
        }
721 727
    }
722 728

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java
16 16
import eu.etaxonomy.cdm.model.name.IZoologicalName;
17 17
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
18 18
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
19
import eu.etaxonomy.taxeditor.event.EventUtility;
20
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
19 21
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
20 22
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
21 23
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
174 176
//		if (getParentElement() instanceof AbstractCdmDetailSection)
175 177
			firePropertyChangeEvent(new CdmPropertyChangeEvent(
176 178
					getParentElement(), null));
179
			EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, true);
177 180
	}
178 181

  
179 182
	@Override
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java
16 16
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
17 17
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
18 18
import eu.etaxonomy.taxeditor.event.EventUtility;
19
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
19 20
import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
20 21
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
21 22
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
153 154
			}
154 155
		}
155 156
		firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
157
		EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, getEntity().getToTaxon());
156 158
	}
157 159

  
158 160
	 @Override
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailSection.java
106 106
                            detailElement.firePropertyChangeEvent(new CdmPropertyChangeEvent(detailElement, null));
107 107
                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_TAXON_DETAILS, true);
108 108
                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_SUPPLEMENTAL, true);
109
                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, true);
109
                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, rel.getToTaxon());
110 110
                            ((TaxonRelationshipDetailElement)detailElement).getTaxonElement().setSelected(true);;
111
//                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_SUPPLEMENTAL, true);
112 111

  
113 112
	                    }
114 113
	                }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)