Project

General

Profile

Revision cd024235

IDcd024235d3dffd63403474311c962249d3fa2274
Parent 9ca50199
Child 68144e34

Added by Katja Luther 2 months ago

ref #9199: adapt nomenclatural status to original source and layout issues

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
1855 1855
        return section;
1856 1856
    }
1857 1857

  
1858
    public SingleSourceSection createSingleSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, CdmBase cdmEntity, ISelectionProvider selectionProvider, int style){
1859
        SingleSourceSection section = new SingleSourceSection(this, conversation, parentElement, cdmEntity, selectionProvider, style);
1858
    public SingleSourceSection createSingleSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, CdmBase cdmEntity, ISelectionProvider selectionProvider, String label, int style){
1859
        SingleSourceSection section = new SingleSourceSection(this, conversation, parentElement, cdmEntity, selectionProvider, style, label);
1860 1860
        addAndAdaptSection(parentElement, section);
1861 1861
        return section;
1862 1862
    }
......
2205 2205
        addAndAdaptElement(parentElement, element);
2206 2206
        return element;
2207 2207
    }
2208
    public OriginalSourceElement createOriginalSourceElement(ICdmFormElement parentElement, CdmBase cdmEntity){
2209
        OriginalSourceElement element = new OriginalSourceElement(this, parentElement, cdmEntity);
2208
    public OriginalSourceElement createOriginalSourceElement(ICdmFormElement parentElement, CdmBase cdmEntity, String label){
2209
        OriginalSourceElement element = new OriginalSourceElement(this, parentElement, cdmEntity, label);
2210 2210
        addAndAdaptElement(parentElement, element);
2211 2211
        return element;
2212 2212
    }
......
2852 2852
            if (parentElement instanceof DescriptionElementSourceSection){
2853 2853
               parent = ((DescriptionElementSourceSection)parentElement).getParent();
2854 2854
            }
2855
            if(parent != null){
2856
                Composite grandParent = parent.getParent();
2857
            }
2858 2855
            element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
2859 2856
                    removeListener, style, false);
2860 2857
        } else if (entity instanceof DescriptionElementSource) {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LabelElement.java
25 25
 * @created Jun 1, 2010
26 26
 * @version 1.0
27 27
 */
28
public class LabelElement extends AbstractCdmFormElement {
28
public class LabelElement extends AbstractCdmFormElement implements ISelectable{
29 29

  
30 30
	private Label label;
31 31

  
......
80 80
	    Font boldFont = boldDescriptor.createFont(label.getDisplay());
81 81
	    label.setFont( boldFont );
82 82
	}
83

  
84

  
85
    @Override
86
    public void setSelected(boolean selected) {
87
        this.label.setBackground(selected ? SELECTED : getPersistentBackground());
88

  
89
    }
90

  
91

  
83 92
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
257 257
        }
258 258
 */
259 259
	    super.createControls(formElement, entity, style);
260
	    setSourceLabel(Messages.TaxonNodeWizardPage_PLACEMENT_SOURCE);
260 261

  
261 262

  
262 263
		selectionNodeAgentRelation = formFactory.createTaxonNodeAgentRelationCollectionSection(formElement, getConversationHolder(), StoreUtil.getSectionStyle(TaxonNodeAgentRelationCollectionSection.class, entity.getClass().getCanonicalName()));
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipDetailElement.java
22 22
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
23 23
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
24 24
import eu.etaxonomy.taxeditor.ui.element.LabelElement;
25
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
25
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
26 26
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSourcedEntityElement;
27 27
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
28 28

  
......
37 37
	private RuleConsideredElement ruleConsidered;
38 38
	private EntitySelectionElement<?> selection_toName;
39 39
	private TermComboElement<NameRelationshipType> combo_relationshipType;
40
	private LabelElement label;
40
	private LabelElement labelElement;
41 41

  
42 42
//	private OriginalSourceElement sourceElement;
43 43

  
......
53 53
	public NameRelationshipDetailElement(CdmFormFactory cdmFormFactory,
54 54
	        AbstractFormSection formElement,
55 55
            NameRelationship entity, SelectionListener removeListener, int style){
56
	    super(cdmFormFactory, formElement, entity, removeListener, style);
56
	    super(cdmFormFactory, formElement, entity, removeListener, "Source", style);
57
	    setSourceLabel("Source");
57 58
	}
58 59

  
59 60
	@Override
60 61
	public void createControls(ICdmFormElement element, int style) {
61 62

  
62 63
	    NameDetailsConfigurator config = PreferencesUtil.getPreferredNameDetailsConfiguration();
63
		label = formFactory.createLabel(element, null);
64
		labelElement = formFactory.createLabel(element, null);
64 65

  
65 66
		if (config == null || config.isNameRelationsRuleConsideredActivated()){
66 67
		    ruleConsidered = formFactory.createRuleConsideredElement(
67 68
		            element, "Rule Considered", config == null
68 69
		            || config.isNameRelationsRuleConsideredCodeEditionActivated(), style);
69 70
		}
71
		LabelElement spacer = formFactory.createLabel(element, null);
72
		spacer.getLayoutComposite().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
73
		addElement(spacer);
70 74
		super.createControls(element, style);
71

  
72

  
73

  
74 75
	}
75 76

  
76 77
	@Override
......
78 79
		String text = (entity.getFromName() == null? "-":entity.getFromName().getTitleCache())
79 80
		        + " is " + (entity.getType()==null?"(no type)":entity.getType().getLabel())
80 81
		        + " " + (entity.getToName()==null?"-":entity.getToName().getTitleCache());
81
		label.setText(text);
82
		labelElement.setText(text);
82 83
		if (ruleConsidered != null){
83 84
		    ruleConsidered.setElement(entity);
84 85
		}
86

  
85 87
		super.setEntity(entity);
86 88
	}
87 89

  
......
99 101

  
100 102
	@Override
101 103
	public void setBackground(Color color) {
102
		if(label != null) {
103
            label.setBackground(color);
104
		if(labelElement != null) {
105
            labelElement.setBackground(color);
104 106
        }
105 107
		super.setBackground(color);
106 108
	}
107 109

  
108
    @Override
109
    public SelectionArbitrator getSelectionArbitrator() {
110
        // TODO Auto-generated method stub
111
        return null;
112
    }
110

  
113 111
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java
24 24
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
25 25
import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
26 26
import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
27
import eu.etaxonomy.taxeditor.ui.element.LabelElement;
28
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
27 29
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
28 30
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSourcedEntityElement;
29 31

  
......
43 45

  
44 46
	public NomenclaturalStatusElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement,
45 47
			NomenclaturalStatus element, SelectionListener removeListener, int style) {
46
		super(cdmFormFactory, formElement, element, removeListener, style);
48
		super(cdmFormFactory, formElement, element, removeListener, "Source", style);
47 49
		selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this);
48 50
	}
49 51

  
......
84 86
		if (config == null || config.isNomenclaturalStatusRuleConsideredActivated()){
85 87
		    ruleConsidered = formFactory.createRuleConsideredElement(this, "Rule Considered", config == null || config.isNomenclaturalStatusRuleConsideredCodeEditionActivated(), style);
86 88
		}
87

  
89
		setSourceLabel("Source");
90
		LabelElement spacer = formFactory.createLabel(this, null);
91
        spacer.getLayoutComposite().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
92
        addElement(spacer);
88 93
		super.createControls(element, style);
89 94

  
95

  
90 96
	}
91 97

  
92 98
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/NomenclaturalReferenceDetailElement.java
31 31
	private EntitySelectionElement<Reference> selection_nomenclaturalReference;
32 32
	private TextWithLabelElement text_referenceDetail;
33 33

  
34
//    private OriginalSourceAdvancedSection advancedSection;
35

  
34 36
	/**
35 37
	 * <p>
36 38
	 * Constructor for NomenclaturalReferenceDetailElement.
......
62 64
		text_referenceDetail = formFactory.createTextWithLabelElement(
63 65
				formElement, "Ref. Detail",
64 66
				entity.getNomenclaturalMicroReference(), style);
67

  
68
//		advancedSection = formFactory.createOriginalSourceAdvancedSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(OriginalSourceAdvancedSection.class, INomenclaturalReference.class.getCanonicalName()));
69
//		advancedSection.setEntity(entity.getNomenclaturalSource());
70
//		addControl(advancedSection);
71
//	    addElement(advancedSection);
65 72
	}
66 73

  
67 74
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/OriginalSourceElement.java
15 15
import eu.etaxonomy.cdm.model.common.CdmBase;
16 16
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
17 17
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
18
import eu.etaxonomy.cdm.model.reference.OriginalSourceBase;
19 18
import eu.etaxonomy.cdm.model.reference.Reference;
20
import eu.etaxonomy.taxeditor.l10n.Messages;
21 19
import eu.etaxonomy.taxeditor.store.StoreUtil;
22 20
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
23 21
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
......
35 33
    private EntitySelectionElement<Reference> selection_Ref;
36 34
    private TextWithLabelElement microReference;
37 35
    private OriginalSourceAdvancedSection advancedSection;
38

  
36
    private String label = "Source";
39 37
    private CdmBase cdmEntity;
40 38

  
41
    public OriginalSourceElement(CdmFormFactory formFactory, ICdmFormElement formElement, CdmBase cdmEntity) {
39
    public OriginalSourceElement(CdmFormFactory formFactory, ICdmFormElement formElement, CdmBase cdmEntity, String label) {
42 40
        super(formFactory, formElement);
43 41
        this.cdmEntity = cdmEntity;
44
//        selectionArbitrator = formFactory.createSelectionArbitrator(this);
42
        this.label = label;
43

  
45 44
    }
46 45

  
47 46
    @Override
48 47
    protected void createControls(ICdmFormElement formElement, DescriptionElementSource entity,  int style) {
49 48

  
50 49
        selection_Ref = formFactory.createSelectionElement(Reference.class,
51
                      formElement, Messages.TaxonNodeWizardPage_PLACEMENT_SOURCE, null,
50
                      formElement, label, null,
52 51
                      EntitySelectionElement.DELETABLE, style, 100);
53 52

  
54 53
        if (entity != null){
......
71 70
        addElement(advancedSection);
72 71
        advancedSection.setBackground(this.getPersistentBackground());
73 72
        advancedSection.setEntity(entity);
74
        advancedSection.setExpanded(false);
75
        if (StringUtils.isNotBlank(((DescriptionElementSource)entity).getIdInSource()) || StringUtils.isNotBlank(((DescriptionElementSource)entity).getIdNamespace()) || StringUtils.isNotBlank(((DescriptionElementSource)entity).getOriginalNameString()) || (((DescriptionElementSource)entity).getLinks() != null && !((DescriptionElementSource)entity).getLinks().isEmpty())  || (((DescriptionElementSource)entity).getNameUsedInSource() != null)){
73

  
74
        if (StringUtils.isNotBlank(entity.getIdInSource()) || StringUtils.isNotBlank(entity.getIdNamespace()) || StringUtils.isNotBlank(entity.getOriginalNameString()) || (entity.getLinks() != null && !entity.getLinks().isEmpty())  || (entity.getNameUsedInSource() != null)){
76 75
            advancedSection.setExpanded(true);
76
        }else{
77
            advancedSection.setExpanded(false);
77 78
        }
78 79
    }
79 80

  
......
90 91
        this.cdmEntity = cdmEntity;
91 92

  
92 93
    }
94

  
95
    public EntitySelectionElement<Reference> getReferenceSelectionElement(){
96
        return selection_Ref;
97
    }
98

  
93 99
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/SingleSourceSection.java
12 12

  
13 13
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
14 14
import eu.etaxonomy.cdm.model.common.CdmBase;
15
import eu.etaxonomy.cdm.model.common.SingleSourcedEntityBase;
16 15
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
17 16
import eu.etaxonomy.cdm.model.reference.Reference;
18 17
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
27 26
public class SingleSourceSection extends AbstractCdmDetailSection<DescriptionElementSource> {
28 27

  
29 28
    private CdmBase cdmEntity;
29
    private String label;
30 30

  
31 31
    public SingleSourceSection(CdmFormFactory formFactory, ConversationHolder conversation,
32
            ICdmFormElement parentElement, CdmBase cdmEntity, ISelectionProvider selectionProvider, int style) {
32
            ICdmFormElement parentElement, CdmBase cdmEntity, ISelectionProvider selectionProvider, int style, String label) {
33 33
        super(formFactory, conversation, parentElement, selectionProvider, style);
34 34
        this.cdmEntity = cdmEntity;
35
        this.label = label;
35 36
        ((OriginalSourceElement)this.detailElement).setCdmEntity(cdmEntity);
36 37
    }
37 38

  
......
39 40
    protected AbstractCdmDetailElement<DescriptionElementSource> createCdmDetailElement(
40 41
            AbstractCdmDetailSection<DescriptionElementSource> parentElement, int style) {
41 42

  
42
        return new OriginalSourceElement(getFormFactory(), parentElement, cdmEntity);
43
        return new OriginalSourceElement(getFormFactory(), parentElement, cdmEntity, label);
43 44
    }
44 45

  
45 46
    @Override
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractSingleSourceElement.java
24 24
            extends AbstractCdmDetailElement<T> implements ISelectableElement{
25 25

  
26 26
    protected OriginalSourceElement singleSourceSection;
27
    private String label;
27 28

  
28 29
    /**
29 30
     * @param formFactory
......
35 36
     */
36 37
    public AbstractSingleSourceElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
37 38
        super(formFactory, formElement);
38
//        setEntity(entity);
39
//        super(formFactory,formElement, entity, removeListener, null, style);
40
//        // TODO Auto-generated constructor stub
41
    }
42 39

  
40
    }
43 41

  
42
    public String getLabel() {
43
        return label;
44
    }
44 45

  
45
//    @Override
46
//    public void setEntity(T entity) {
47
//        this.entity = entity;
48
//
49
//    }
46
    public void setSourceLabel(String label) {
47
        if (singleSourceSection != null){
48
            singleSourceSection.getReferenceSelectionElement().setLabel(label);
49
        }
50
        this.label = label;
51
    }
50 52

  
51 53
    @Override
52 54
    public void createControls(ICdmFormElement formElement, T entity, int style) {
53
        singleSourceSection = formFactory.createOriginalSourceElement(formElement, entity);
55
        singleSourceSection = formFactory.createOriginalSourceElement(formElement, entity, label);
54 56
        if (entity.getSource() == null){
55 57
            DescriptionElementSource source = DescriptionElementSource.NewPrimarySourceInstance(null, null);
56 58
            entity.setSource(source);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractSourcedEntityElement.java
30 30

  
31 31
	private SelectionArbitrator selectionArbitrator;
32 32
	private OriginalSourceElement sourceElement;
33
	private String label = "Source";
33 34
//	protected EntitySelectionElement<Reference> selection_reference;
34 35
//	protected TextWithLabelElement text_referenceDetail;
35 36

  
......
37 38

  
38 39
	public AbstractSourcedEntityElement(CdmFormFactory formFactory,
39 40
			AbstractFormSection section, T entity,
40
			SelectionListener removeListener, int style, boolean isCommonNameReference) {
41
			SelectionListener removeListener, String label, int style, boolean isCommonNameReference) {
41 42
		super(formFactory, section, entity, removeListener, null, style);
42 43
		// make this element selectable
43 44
		if(formFactory.getSelectionProvider() != null){
44 45
			selectionArbitrator = formFactory.createSelectionArbitrator(this);
45 46
		}
46 47
		this.isCommonNameReference = isCommonNameReference;
48

  
49

  
47 50
	}
48 51

  
49 52
    public AbstractSourcedEntityElement(CdmFormFactory formFactory,
50 53
            AbstractFormSection section, T entity,
51
            SelectionListener removeListener, int style) {
52
        super(formFactory, section, entity, removeListener, null, style);
53
        // make this element selectable
54
        if(formFactory.getSelectionProvider() != null){
55
            selectionArbitrator = formFactory.createSelectionArbitrator(this);
56
        }
54
            SelectionListener removeListener, String label, int style) {
55
        this(formFactory, section, entity, removeListener, label, style, false);
57 56
    }
58 57

  
59
	@Override
58

  
59
    @Override
60 60
	public void createControls(ICdmFormElement formElement, int style) {
61 61

  
62
	    sourceElement = formFactory.createOriginalSourceElement(formElement, entity);
62
	    sourceElement = formFactory.createOriginalSourceElement(formElement, entity, label);
63 63

  
64 64
        if (entity.getSource() == null){
65 65
            DescriptionElementSource source = DescriptionElementSource.NewPrimarySourceInstance(null, null);
......
75 75
	@Override
76 76
	public void setEntity(T entity) {
77 77
		this.entity = entity;
78

  
79
//		selection_reference.setEntity(entity.getCitation());
80
//		text_referenceDetail.setText(entity.getCitationMicroReference());
81 78
	}
82 79

  
83 80
	@Override
......
85 82
		return selectionArbitrator;
86 83
	}
87 84

  
85
	public void setSourceLabel(String sourceLabel){
86
	    this.label = sourceLabel;
87
	    if (sourceElement != null){
88
	        this.sourceElement.getReferenceSelectionElement().setLabel(sourceLabel);
89
	    }
90
	}
91

  
88 92
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java
25 25
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
26 26
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
27 27
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
28
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
28 29
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
29 30
import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
30
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
31
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSingleSourceElement;
31 32
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
32 33

  
33 34
/**
......
35 36
 * @date Dec 1, 2011
36 37
 *
37 38
 */
38
public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<TaxonRelationship> {
39
public class TaxonRelationshipDetailElement extends AbstractSingleSourceElement<TaxonRelationship> {//TODO: use AbstractSingleSourcedElement
39 40

  
40 41
	private TermComboElement<TaxonRelationshipTypeInverseContainer> combo_taxonRelationshipType;
41 42
	private MisappliedRelationshipComboElement combo_misappliedRelationshipType;
......
43 44
	private EntitySelectionElement<Taxon> selection_relatedTaxon;
44 45
	private CheckboxElement checkBoxDoubtful;
45 46
	protected ToggleableTextElement toggleable_cache;
46
	private  EntitySelectionElement<Reference> secReference;
47
//	private  EntitySelectionElement<Reference> secReference;
47 48
	private  EntitySelectionElement<Reference> sensuReference;
48 49
	private TextWithLabelElement text_sensu_microreference;
49 50

  
50 51

  
51
	private TextWithLabelElement text_secundum_microreference;
52
//	private TextWithLabelElement text_secundum_microreference;
52 53

  
53 54
	private TextWithLabelElement text_appendedPhrase;
54 55

  
55 56
    private CheckboxElement checkbox_published;
56 57

  
57

  
58 58
	private Taxon taxon;
59 59

  
60 60
	private TaxonDetailSection taxonElement;
......
65 65

  
66 66
    public TaxonRelationshipDetailElement(CdmFormFactory formFactory,
67 67
			ICdmFormElement formElement) {
68

  
68 69
		super(formFactory, formElement);
69 70
	}
70 71

  
71 72
	@Override
72
	protected void createControls(ICdmFormElement formElement,
73
    public void createControls(ICdmFormElement formElement,
73 74
			TaxonRelationship entity, int style) {
74 75
	    if ((entity.getType().isMisappliedNameOrInvalidDesignation()) ){
75 76

  
......
119 120
            }else{
120 121
                label = "Err. Sec.";
121 122
            }
123

  
124
            /*TODO: use super.createControls(); to create single source element
122 125
            secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
123 126
                    formElement, label,
124 127
                    entity.getCitation(), EntitySelectionElement.ALL,
......
128 131
                    formElement, "Detail",
129 132
                    entity.getCitationMicroReference(),null,
130 133
                    SWT.WRAP);
134
                    */
135
            super.createControls(formElement, entity, style);
136
            setSourceLabel(label);
137

  
131 138
            if (entity.getType().isAnyMisappliedName()) {
132 139
                label = "Misapplication Doubtful";
133 140
            }else{
......
149 156

  
150 157
            checkbox_published = formFactory.createCheckbox(this,
151 158
                    "Published", taxon.isPublish(), style);
152
            secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
159
            /*
160
             * secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
161

  
153 162
                    formElement, "Syn. Sec.",
154 163
                    entity.getCitation(), EntitySelectionElement.ALL,
155 164
                    style);
......
158 167
                    formElement, "Detail",
159 168
                    entity.getCitationMicroReference(),null,
160 169
                    SWT.WRAP);
170
                    */
171

  
172
            super.createControls(formElement, entity, style);
173
            setSourceLabel("Syn. Sec.");
161 174
            sensuReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
162 175
                    formElement, "Sec",
163 176
                   taxon.getSec(), EntitySelectionElement.ALL,
......
207 220
	@Override
208 221
	public void handleEvent(Object eventSource) {
209 222
		if (getEntity().getType().isMisappliedNameOrInvalidDesignation() || getEntity().getType().isAnySynonym()){
210
			 if (eventSource == secReference) {
223
			/* if (eventSource == secReference) {
211 224
				getEntity().setCitation(secReference.getSelection());
212 225
			} else if (eventSource == text_secundum_microreference) {
213 226
				getEntity().setCitationMicroReference(text_secundum_microreference.getText());
214
			}  else if (eventSource == text_sensu_microreference) {
227
			}  else
228
			   */
229
			    if (eventSource == text_sensu_microreference) {
215 230
		        taxon.setSecMicroReference(text_sensu_microreference.getText());
216 231
			} else if (eventSource == sensuReference) {
217 232
				taxon.setSec(sensuReference.getSelection());
......
272 287

  
273 288
	}
274 289

  
290
    @Override
291
    public SelectionArbitrator getSelectionArbitrator() {
292
        // TODO Auto-generated method stub
293
        return null;
294
    }
295

  
275 296

  
276 297

  
277 298
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)