Revision f3bb4cae
Added by Andreas Kohlbecker about 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowPresenter.java | ||
---|---|---|
23 | 23 |
import eu.etaxonomy.cdm.mock.RegistrationService; |
24 | 24 |
import eu.etaxonomy.cdm.model.name.Rank; |
25 | 25 |
import eu.etaxonomy.cdm.model.name.TaxonNameFactory; |
26 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
27 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
|
28 |
import eu.etaxonomy.cdm.vaadin.editor.reference.ReferencePopupEditor; |
|
26 | 29 |
import eu.etaxonomy.cdm.vaadin.event.ReferenceEvent; |
27 | 30 |
import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent; |
28 | 31 |
import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent; |
... | ... | |
83 | 86 |
} |
84 | 87 |
} |
85 | 88 |
|
86 |
// @EventListener(condition = "#event.eventType ==T(eu.etaxonomy.cdm.vaadin.event.EventType).ADD") |
|
87 |
// public void onReferenceAddEvent(ReferenceEvent event) { |
|
88 |
// getView().openReferenceEditor(null); |
|
89 |
// } |
|
89 |
@EventListener(condition = "#event.eventType ==T(eu.etaxonomy.cdm.vaadin.event.EntityEventType).ADD") |
|
90 |
public void onReferenceAddEvent(ReferenceEvent event) { |
|
91 |
Reference reference = ReferenceFactory.newGeneric(); |
|
92 |
ReferencePopupEditor popup = getNavigationManager().showInPopup(ReferencePopupEditor.class); |
|
93 |
popup.showInEditor(reference); |
|
94 |
} |
|
90 | 95 |
|
91 | 96 |
@EventListener(condition = "#event.eventType ==T(eu.etaxonomy.cdm.vaadin.event.EntityEventType).EDIT") |
92 | 97 |
public void onReferenceEditEvent(ReferenceEvent event) { |
93 |
getView().openReferenceEditor(null); |
|
98 |
Reference reference = getRepo().getReferenceService().find(event.getEntityId()); |
|
99 |
ReferencePopupEditor popup = getNavigationManager().showInPopup(ReferencePopupEditor.class); |
|
100 |
popup.showInEditor(reference); |
|
94 | 101 |
} |
95 | 102 |
|
96 | 103 |
|
Also available in: Unified diff
ref #6169 very basic Reference editor experiment