1
|
/**
|
2
|
* Copyright (C) 2017 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.vaadin.view.phycobank;
|
10
|
|
11
|
import com.vaadin.navigator.View;
|
12
|
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
|
13
|
import com.vaadin.spring.annotation.SpringView;
|
14
|
|
15
|
import eu.etaxonomy.cdm.vaadin.design.phycobank.RegistrationWorkflowDesign;
|
16
|
import eu.etaxonomy.cdm.vaadin.presenter.phycobank.RegistrationType;
|
17
|
|
18
|
/**
|
19
|
* @author a.kohlbecker
|
20
|
* @since Mar 2, 2017
|
21
|
*
|
22
|
*/
|
23
|
@SpringView(name=RegistrationWorkflowView.NAME)
|
24
|
public class RegistrationWorkflowView extends RegistrationWorkflowDesign implements View {
|
25
|
|
26
|
private static final long serialVersionUID = -213040114015958970L;
|
27
|
|
28
|
public static final String NAME = "workflow";
|
29
|
|
30
|
RegistrationType regType = null;
|
31
|
|
32
|
/**
|
33
|
* {@inheritDoc}
|
34
|
*/
|
35
|
@Override
|
36
|
public void enter(ViewChangeEvent event) {
|
37
|
if(event.getParameters() != null){
|
38
|
String[] params = event.getParameters().split("/");
|
39
|
if(params.length > 0){
|
40
|
regType = RegistrationType.valueOf(params[0]);
|
41
|
title.setValue(title.getValue() + " " + regType.name() + " ...");
|
42
|
}
|
43
|
}
|
44
|
|
45
|
}
|
46
|
|
47
|
}
|