Revision d7a6157d
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/TaxonEditorInputE4.java | ||
---|---|---|
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
private void init(TaxonNode taxonNode) { |
85 |
this.taxonNode = taxonNode;
|
|
85 |
this.taxonNode = taxonNode;
|
|
86 | 86 |
} |
87 | 87 |
|
88 | 88 |
|
89 | 89 |
private void initForTaxonNode(UUID taxonNodeUuid) { |
90 |
|
|
91 |
|
|
90 |
this.getCdmEntitySession().bind(); |
|
92 | 91 |
TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, getTaxonNodePropertyPaths()); |
93 |
|
|
94 | 92 |
if(taxonNode == null){ |
95 | 93 |
MessagingUtils.warningDialog(Messages.TaxonEditorInput_NOT_IMPLEMENTED, TaxonEditorInputE4.class, Messages.TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE); |
96 | 94 |
} |
... | ... | |
100 | 98 |
} |
101 | 99 |
|
102 | 100 |
private void initForTaxonBase(UUID taxonBaseUuid) { |
101 |
this.getCdmEntitySession().bind(); |
|
103 | 102 |
TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(taxonBaseUuid, getTaxonBasePropertyPaths()); |
104 | 103 |
if (taxonBase != null){ |
105 | 104 |
if(taxonBase.isInstanceOf(Taxon.class)){ |
... | ... | |
138 | 137 |
|
139 | 138 |
|
140 | 139 |
private void initForParentTaxonNode(UUID parentNodeUuid){ |
141 |
|
|
142 |
|
|
140 |
this.getCdmEntitySession().bind(); |
|
143 | 141 |
TaxonName name = PreferencesUtil.getPreferredNomenclaturalCode().getNewTaxonNameInstance(null); |
144 | 142 |
ITaxonTreeNode parentNode = CdmStore.getService(IClassificationService.class).getTreeNodeByUuid(parentNodeUuid); |
145 | 143 |
|
... | ... | |
155 | 153 |
private void setInputForMultipleNodes(ConversationHolder conversation, Set<TaxonNode> taxonNodes){ |
156 | 154 |
if(taxonNodes.size() == 1){ |
157 | 155 |
TaxonNode taxonNode = taxonNodes.iterator().next(); |
156 |
taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths()); |
|
158 | 157 |
init(taxonNode); |
159 | 158 |
}else if(taxonNodes.size() > 1){ |
160 | 159 |
TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(taxonNodes); |
160 |
taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths()); |
|
161 | 161 |
if(taxonNode != null){ |
162 | 162 |
init(taxonNode); |
163 | 163 |
} |
Also available in: Unified diff
load taxonnode within editor session and bind editor session when opening taxon from search result