Revision 7a044d6b
Added by Andreas Kohlbecker about 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/presenter/registration/RegistrationWorkflowPresenter.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.cdm.vaadin.presenter.registration; |
10 | 10 |
|
11 |
import java.util.ArrayList; |
|
12 |
import java.util.List; |
|
13 |
|
|
11 | 14 |
import org.apache.log4j.Logger; |
12 | 15 |
import org.springframework.beans.factory.annotation.Autowired; |
13 | 16 |
import org.springframework.context.event.EventListener; |
... | ... | |
21 | 24 |
import eu.etaxonomy.cdm.model.name.Rank; |
22 | 25 |
import eu.etaxonomy.cdm.model.name.TaxonNameFactory; |
23 | 26 |
import eu.etaxonomy.cdm.vaadin.event.ReferenceEvent; |
27 |
import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent; |
|
24 | 28 |
import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent; |
25 | 29 |
import eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet; |
26 | 30 |
import eu.etaxonomy.cdm.vaadin.view.registration.RegistrationWorkflowView; |
... | ... | |
90 | 94 |
getView().openReferenceEditor(null); |
91 | 95 |
} |
92 | 96 |
|
97 |
@EventListener(classes=ShowDetailsEvent.class, condition = "#event.entityType == T(eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet)") |
|
98 |
public void onShowDetailsEvent(ShowDetailsEvent<?,?> event) { // WARNING don't use more specific generic type arguments |
|
99 |
List<String> messages = new ArrayList<>(); |
|
100 |
for(RegistrationDTO dto : workingset.getRegistrationDTOs()){ |
|
101 |
dto.getMessages().forEach(m -> messages.add(dto.getSummary() + ": " + m)); |
|
102 |
} |
|
103 |
if(event.getProperty().equals("messages")){ |
|
104 |
getView().openDetailsPopup("Messages", messages); |
|
105 |
} |
|
106 |
} |
|
107 |
|
|
93 | 108 |
} |
Also available in: Unified diff
ref #6169 reusing RegistrationItem for WorkflowView