Revision 70c753df
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java | ||
---|---|---|
38 | 38 |
import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStyles; |
39 | 39 |
import eu.etaxonomy.cdm.vaadin.component.registration.TypeStateLabel; |
40 | 40 |
import eu.etaxonomy.cdm.vaadin.component.registration.WorkflowSteps; |
41 |
import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction; |
|
41 | 42 |
import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.Type; |
42 | 43 |
import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction; |
44 |
import eu.etaxonomy.cdm.vaadin.event.RegistrationEditorAction; |
|
43 | 45 |
import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent; |
44 | 46 |
import eu.etaxonomy.cdm.vaadin.event.TaxonNameEditorAction; |
45 | 47 |
import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent; |
... | ... | |
122 | 124 |
registration.setId(DOM_ID_WORKINGSET); |
123 | 125 |
registration.setWidth(100, Unit.PERCENTAGE); |
124 | 126 |
|
125 |
Panel namesTypesPanel = createNamesAndTypesList(workingset);
|
|
127 |
Panel namesTypesPanel = createRegistrationsList(workingset);
|
|
126 | 128 |
namesTypesPanel.setStyleName("registration-list"); |
127 | 129 |
namesTypesPanel.setCaption("Registrations"); |
128 | 130 |
|
... | ... | |
180 | 182 |
* @param workingset |
181 | 183 |
* @return |
182 | 184 |
*/ |
183 |
public Panel createNamesAndTypesList(RegistrationWorkingSet workingset) {
|
|
185 |
public Panel createRegistrationsList(RegistrationWorkingSet workingset) {
|
|
184 | 186 |
// prepare name and type list |
185 | 187 |
GridLayout namesTypesList = new GridLayout(3, workingset.getRegistrationDTOs().size()); |
186 | 188 |
int row = 0; |
... | ... | |
206 | 208 |
|
207 | 209 |
Button editButton = new Button(FontAwesome.EDIT); |
208 | 210 |
editButton.setStyleName(ValoTheme.BUTTON_TINY + " " + ValoTheme.BUTTON_PRIMARY); |
211 |
editButton.addClickListener(e -> getEventBus().publishEvent(new RegistrationEditorAction( |
|
212 |
AbstractEditorAction.Type.EDIT, |
|
213 |
dto.getId() |
|
214 |
))); |
|
209 | 215 |
|
210 | 216 |
namesTypesList.addComponent(new TypeStateLabel().update(dto.getRegistrationType(), dto.getStatus()), 0, row); |
211 | 217 |
namesTypesList.addComponent(new Label(dto.getSummary()), 1, row); |
Also available in: Unified diff
ref #6169 initial Popup editor for Registrations