Revision 70c753df
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowPresenter.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.cdm.service.IRegistrationWorkingSetService; |
31 | 31 |
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent; |
32 | 32 |
import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction; |
33 |
import eu.etaxonomy.cdm.vaadin.event.RegistrationEditorAction; |
|
33 | 34 |
import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent; |
34 | 35 |
import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent; |
35 | 36 |
import eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet; |
... | ... | |
115 | 116 |
} |
116 | 117 |
|
117 | 118 |
@EventListener(condition = "#event.type ==T(eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.Type).ADD") |
118 |
public void onReferenceAddEvent(ReferenceEditorAction event) {
|
|
119 |
public void onReferenceEditorActionAdd(ReferenceEditorAction event) {
|
|
119 | 120 |
Reference reference = ReferenceFactory.newGeneric(); |
120 | 121 |
ReferencePopupEditor popup = getNavigationManager().showInPopup(ReferencePopupEditor.class); |
121 | 122 |
popup.showInEditor(reference); |
122 | 123 |
} |
123 | 124 |
|
124 | 125 |
@EventListener(condition = "#event.type ==T(eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.Type).EDIT") |
125 |
public void onReferenceEditEvent(ReferenceEditorAction event) {
|
|
126 |
public void onReferenceEditorActionEdit(ReferenceEditorAction event) {
|
|
126 | 127 |
TransactionStatus tx = getRepo().startTransaction(false); |
127 | 128 |
Reference reference = getRepo().getReferenceService().find(event.getEntityId()); |
128 | 129 |
ReferencePopupEditor popup = getNavigationManager().showInPopup(ReferencePopupEditor.class); |
... | ... | |
130 | 131 |
getRepo().commitTransaction(tx); |
131 | 132 |
} |
132 | 133 |
|
134 |
@EventListener(condition = "#event.type ==T(eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.Type).EDIT") |
|
135 |
public void onRegistrationEditorAction(RegistrationEditorAction event) { |
|
136 |
TransactionStatus tx = getRepo().startTransaction(false); |
|
137 |
Registration registration = getRepo().getRegistrationService().find(event.getEntityId()); |
|
138 |
RegistrationPopupEditor popup = getNavigationManager().showInPopup(RegistrationPopupEditor.class); |
|
139 |
popup.showInEditor(registration); |
|
140 |
getRepo().commitTransaction(tx); |
|
141 |
} |
|
142 |
|
|
133 | 143 |
|
134 | 144 |
@EventListener(classes=ShowDetailsEvent.class, condition = "#event.type == T(eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet)") |
135 | 145 |
public void onShowRegistrationWorkingSetMessages(ShowDetailsEvent<?,?> event) { // WARNING don't use more specific generic type arguments |
Also available in: Unified diff
ref #6169 initial Popup editor for Registrations