Revision b1fe8acf
Added by Fabian Reimeier over 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/distributionStatus/DistributionSettingsConfigWindow.java | ||
---|---|---|
105 | 105 |
taxonFilter.addValueChangeListener(this); |
106 | 106 |
taxonTree.addExpandListener(this); |
107 | 107 |
|
108 |
TermVocabulary<NamedArea> chosenArea = presenter.getChosenArea(); |
|
108 |
//init areas |
|
109 |
TermVocabulary<NamedArea> chosenAreaVoc = presenter.getChosenAreaVoc(); |
|
109 | 110 |
distAreaBox.setContainerDataSource(presenter.getDistributionContainer()); |
110 |
distAreaBox.setValue(chosenArea); |
|
111 |
distAreaBox.setValue(chosenAreaVoc);
|
|
111 | 112 |
distAreaBox.addValueChangeListener(this); |
112 | 113 |
|
113 |
if(chosenArea!=null){ |
|
114 |
NamedAreaContainer container = new NamedAreaContainer(chosenArea); |
|
114 |
if(chosenAreaVoc!=null){
|
|
115 |
NamedAreaContainer container = new NamedAreaContainer(chosenAreaVoc);
|
|
115 | 116 |
namedAreaList.setContainerDataSource(container); |
116 | 117 |
} |
117 | 118 |
Object selectedAreas = VaadinSession.getCurrent().getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREAS); |
... | ... | |
261 | 262 |
Object source = event.getSource(); |
262 | 263 |
if(source==okButton){ |
263 | 264 |
List<UUID> taxonNodes = new ArrayList<>(); |
264 |
TermVocabulary<NamedArea> term = null;
|
|
265 |
TermVocabulary<NamedArea> areaVoc = null;
|
|
265 | 266 |
String uuidString = (String) classificationBox.getContainerProperty(classificationBox.getValue(),"uuid").getValue(); |
266 | 267 |
UUID classificationUuid = UUID.fromString(uuidString); |
267 | 268 |
Set<UuidAndTitleCache<TaxonNode>> treeSelection = (Set<UuidAndTitleCache<TaxonNode>>) taxonTree.getValue(); |
... | ... | |
270 | 271 |
taxonNodes.add(uuidAndTitleCache.getUuid()); |
271 | 272 |
} |
272 | 273 |
} |
273 |
term = (TermVocabulary<NamedArea>) distAreaBox.getValue();
|
|
274 |
areaVoc = (TermVocabulary<NamedArea>) distAreaBox.getValue();
|
|
274 | 275 |
Set<NamedArea> selectedAreas = (Set<NamedArea>) namedAreaList.getValue(); |
275 |
DistributionEditorUtil.updateDistributionView(distributionTableView, taxonNodes, term, selectedAreas, classificationUuid);
|
|
276 |
DistributionEditorUtil.updateDistributionView(distributionTableView, taxonNodes, areaVoc, selectedAreas, classificationUuid);
|
|
276 | 277 |
window.close(); |
277 | 278 |
} |
278 | 279 |
else if(source==cancelButton){ |
Also available in: Unified diff
ref #6903