Project

General

Profile

Revision 18960c83

ID18960c83f1a6c384ca68ca4213b393b134428393
Parent c861560c
Child cb7b8f2b

Added by Katja Luther over 1 year ago

ref #8088: open taxonnode from result

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
16 16
import eu.etaxonomy.cdm.api.service.UpdateResult;
17 17
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
18 18
import eu.etaxonomy.cdm.model.reference.Reference;
19
import eu.etaxonomy.cdm.model.taxon.Classification;
20 19
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
21 20
import eu.etaxonomy.cdm.model.taxon.Taxon;
22 21
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
......
67 66
            openEmptyEditor = true;
68 67
        }else{
69 68
            getConversationHolder().bind();
70
            ITaxonTreeNode parent = getParentTreeNode();
69
//            ITaxonTreeNode parent = getParentTreeNode();
71 70
            try{
72 71
            	UUID parentNodeUuid;
73
            	if(parent instanceof Classification){
74
            	    parentNodeUuid = ((Classification) parent).getRootNode().getUuid();
75
            	}
76
            	else{
77
            	    parentNodeUuid = parent.getUuid();
78
            	}
72
//            	if(parent instanceof Classification){
73
//            	    parentNodeUuid = ((Classification) parent).getRootNode().getUuid();
74
//            	}
75
//            	else{
76
//            	    parentNodeUuid = parent.getUuid();
77
//            	}
79 78
            	UpdateResult result;
80 79
            	result = CdmStore.getService(ITaxonNodeService.class).saveNewTaxonNode(getEntity());
81 80
            	if (result.isOk()){
81
            	    this.setEntity((TaxonNode)result.getCdmEntity());
82 82
            	    CdmApplicationState.getCurrentDataChangeService()
83 83
	                         .fireChangeEvent(new CdmChangeEvent(Action.Create, result.getUpdatedObjects(), NewTaxonNodeWizard.class), true);
84 84

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/EditTaxonNodeWizard.java
104 104
        return null;
105 105
    }
106 106

  
107
    @Override
108
    public void dispose() {
109
        cdmEntitySession.dispose();
110
        super.dispose();
111
    }
112

  
107 113

  
108 114

  
109 115
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)