private ITaxonTreeNode parentTreeNode;
private EntitySelectionElement<Taxon> selection_reuseExistingTaxon;
+ private EntitySelectionElement<Reference> selection_SecRef;
private Taxon taxon;
+
+ private Reference secReference;
private TextWithLabelElement textNewTaxonName;
selection_parentTaxonNode = formFactory
.createTaxonNodeSelectionElement(getConversationHolder(), formElement, "Parent", null,
EntitySelectionElement.DELETABLE, style);
+ selection_SecRef = formFactory
+ .createSelectionElement(Reference.class,getConversationHolder(), formElement, "Secundum Reference", null,
+ EntitySelectionElement.DELETABLE, style);
selection_reuseExistingTaxon = formFactory
.createSelectionElement(Taxon.class,
getConversationHolder(), formElement,
setClassification(selection_classification.getEntity());
} else if (eventSource == selection_parentTaxonNode) {
setParentTreeNode(selection_parentTaxonNode.getEntity());
+ } else if (eventSource == selection_SecRef) {
+ setSecReference(selection_SecRef.getEntity());
} else if (eventSource == selection_reuseExistingTaxon) {
boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
selection_reuseExistingName.setEnabled(enabled);
this.parentTreeNode = selection_classification.getEntity();
}
}
+
+ private void setSecReference(Reference secRef){
+ this.secReference = secRef;
+ setTaxon(textNewTaxonName.getText());
+ }
private void setTaxon(Taxon taxon) {
this.taxon = taxon;
private void setTaxon(TaxonNameBase taxonName) {
Reference secundum = null;
if (getParentTreeNode() != null) {
- if (getParentTreeNode() instanceof Classification) {
+ if (this.secReference != null){
+ secundum = this.secReference;
+ } else if (getParentTreeNode() instanceof Classification) {
secundum = ((Classification) getParentTreeNode())
.getReference();
} else if (getParentTreeNode() instanceof TaxonNode) {