Revision 0844524a
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java | ||
---|---|---|
13 | 13 |
import java.util.HashSet; |
14 | 14 |
import java.util.List; |
15 | 15 |
import java.util.Set; |
16 |
import java.util.UUID; |
|
16 | 17 |
|
17 | 18 |
import org.apache.log4j.Logger; |
18 | 19 |
import org.hibernate.criterion.Restrictions; |
... | ... | |
135 | 136 |
* {@inheritDoc} |
136 | 137 |
*/ |
137 | 138 |
@Override |
138 |
protected TaxonName loadCdmEntityById(Integer identifier) {
|
|
139 |
protected TaxonName loadCdmEntity(UUID identifier) {
|
|
139 | 140 |
|
140 | 141 |
List<String> initStrategy = Arrays.asList(new String []{ |
141 | 142 |
|
... | ... | |
216 | 217 |
* {@inheritDoc} |
217 | 218 |
*/ |
218 | 219 |
@Override |
219 |
protected void guaranteePerEntityCRUDPermissions(Integer identifier) {
|
|
220 |
protected void guaranteePerEntityCRUDPermissions(UUID identifier) {
|
|
220 | 221 |
if(crud != null){ |
221 | 222 |
newAuthorityCreated = UserHelper.fromSession().createAuthorityForCurrentUser(TaxonName.class, identifier, crud, null); |
222 | 223 |
} |
... | ... | |
316 | 317 |
referenceEditorPopup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE)); |
317 | 318 |
referenceEditorPopup.withDeleteButton(true); |
318 | 319 |
referenceEditorPopup.setBeanInstantiator(newReferenceInstantiator); |
319 |
referenceEditorPopup.loadInEditor(event.getEntityId());
|
|
320 |
referenceEditorPopup.loadInEditor(event.getEntityUuid());
|
|
320 | 321 |
if(newReferenceInstantiator != null){ |
321 | 322 |
// this is a bit clumsy, we actually need to inject something like a view configurer |
322 | 323 |
// which can enable, disable fields |
... | ... | |
375 | 376 |
.filter( |
376 | 377 |
m -> !TaxonNamePopupEditorMode.NOMENCLATURALREFERENCE_SECTION_EDITING_ONLY.equals(m)) |
377 | 378 |
.forEach(m -> basionymNamePopup.enableMode(m)); |
378 |
basionymNamePopup.loadInEditor(event.getEntityId());
|
|
379 |
basionymNamePopup.loadInEditor(event.getEntityUuid());
|
|
379 | 380 |
basionymNamePopup.getBasionymToggle().setVisible(false); |
380 | 381 |
|
381 | 382 |
} |
Also available in: Unified diff
switching vom id based to uuid based ui navigation and entity references