Project

General

Profile

« Previous | Next » 

Revision 65b0eef9

Added by Katja Luther over 5 years ago

ref #7677: set default type for nomenclatural status while creating new status

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java
54 54
		ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style);
55 55

  
56 56
		super.createControls(element, style);
57
		if (vocabulary.getTerms().contains(NomenclaturalStatusType.ILLEGITIMATE()) && getEntity().getType() == null){
58
            nomenclaturalStatusTypeCombo.setSelection(NomenclaturalStatusType.ILLEGITIMATE());
59
            getEntity().setType(nomenclaturalStatusTypeCombo.getSelection());
60
        }
57

  
61 58
	}
62 59

  
63 60
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusSection.java
15 15
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 16
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
17 17
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
18
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
18 19
import eu.etaxonomy.cdm.model.name.TaxonName;
19 20
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
20 21
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
65 66
	/** {@inheritDoc} */
66 67
	@Override
67 68
	public NomenclaturalStatus createNewElement() {
68
		return NomenclaturalStatus.NewInstance(null);
69
		return NomenclaturalStatus.NewInstance(NomenclaturalStatusType.ILLEGITIMATE());
69 70
	}
70 71

  
71 72
	/** {@inheritDoc} */

Also available in: Unified diff