commit 5b4537c465516b4c4650ea1a7d92b0c10eb0be6f
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Tue Mar 21 17:20:41 2017 +0100

    ref #6169 replacing declarative WorkflowViewDesign

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java b/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
index 11ee2eb5..873dea2d 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
@@ -95,11 +95,7 @@ public class RegistrationItem extends GridLayout {
         messageButton.setEnabled(false);
         openButton.setStyleName(ValoTheme.BUTTON_TINY);
         openButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
-        openButton.addClickListener(e -> parentView.getEventBus().publishEvent(new NavigationEvent(
-                RegistrationWorkflowViewBean.NAME,
-                RegistrationWorkflowViewBean.ACTION_EDIT,
-                regDto.getSpecificIdentifier().toString()
-                )));
+
         buttonGroup.setStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
         addComponent(buttonGroup, 2, 0);
         setComponentAlignment(buttonGroup, Alignment.TOP_RIGHT);
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/WorkflowSteps.java b/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/WorkflowSteps.java
index 9e39a877..3df23d47 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/WorkflowSteps.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/WorkflowSteps.java
@@ -19,9 +19,8 @@ import eu.etaxonomy.cdm.vaadin.design.registration.WorkflowStepsDesign;
  */
 public class WorkflowSteps extends WorkflowStepsDesign {
 
-    /**
-     *
-     */
+    private static final long serialVersionUID = 7224620045791102584L;
+
     public WorkflowSteps() {
         // TODO Auto-generated constructor stub
     }
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/design/registration/RegistrationWorkflowDesign.java b/src/main/java/eu/etaxonomy/cdm/vaadin/design/registration/RegistrationWorkflowDesign.java
deleted file mode 100644
index dfd0e3ad..00000000
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/design/registration/RegistrationWorkflowDesign.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package eu.etaxonomy.cdm.vaadin.design.registration;
-
-import com.vaadin.annotations.AutoGenerated;
-import com.vaadin.annotations.DesignRoot;
-import com.vaadin.ui.CssLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.declarative.Design;
-
-/** 
- * !! DO NOT EDIT THIS FILE !!
- * 
- * This class is generated by Vaadin Designer and will be overwritten.
- * 
- * Please make a subclass with logic and additional interfaces as needed,
- * e.g class LoginView extends LoginDesign implements View { }
- */
-@DesignRoot
-@AutoGenerated
-@SuppressWarnings("serial")
-public class RegistrationWorkflowDesign extends VerticalLayout {
-    protected Label title;
-    protected CssLayout workflow;
-
-    public RegistrationWorkflowDesign() {
-        Design.read(this);
-    }
-}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/registration/RegistrationWorkflowPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/registration/RegistrationWorkflowPresenter.java
index 075a7e6d..d595c636 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/registration/RegistrationWorkflowPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/registration/RegistrationWorkflowPresenter.java
@@ -8,6 +8,7 @@
 */
 package eu.etaxonomy.cdm.vaadin.presenter.registration;
 
+import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.event.EventListener;
 
@@ -46,6 +47,11 @@ public class RegistrationWorkflowPresenter extends AbstractPresenter<Registratio
     @EventListener
     protected void onRegistrationStartEvent(RegistrationWorkflowEvent e){
 
+        if(registration != null){
+            Logger.getLogger(RegistrationWorkflowPresenter.class).warn("Foiling attempt to start another registration in existing workflow");
+            return;
+        }
+
         if(e.isStart()) {
             registration = new Registration();
             registration.setName(TaxonNameFactory.NewBotanicalInstance(Rank.SPECIES()));
@@ -53,7 +59,7 @@ public class RegistrationWorkflowPresenter extends AbstractPresenter<Registratio
             registration = serviceMock.loadByRegistrationID(e.getRegistrationID());
         }
         if(registration != null){
-            getView().getTitle().setValue("Workflow for a " + registrationType().name());
+            // getView().getTitle().setValue("Workflow for a " + registrationType().name());
             getView().makeWorflow(registrationType());
         }
     }
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/AbstractPageView.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/AbstractPageView.java
index c8ee0ae1..07995ae3 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/AbstractPageView.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/AbstractPageView.java
@@ -43,13 +43,20 @@ public abstract class AbstractPageView<P extends AbstractPresenter> extends Abst
         header.setStyleName(ValoTheme.LABEL_HUGE);
         header.setWidth(100, Unit.PERCENTAGE);
         header.setContentMode(ContentMode.HTML);
-        header.setValue("<div id=\"header\">" + getHeaderText() + "</div><div id=\"subheader\">" + getSubHeaderText() + "</div>");
+        updateHeader();
         layout.addComponent(header);
 
         setCompositionRoot(layout);
         this.setSizeFull();
     }
 
+    /**
+     * 
+     */
+    public void updateHeader() {
+        header.setValue("<div id=\"header\">" + getHeaderText() + "</div><div id=\"subheader\">" + getSubHeaderText() + "</div>");
+    }
+
     protected CssLayout getLayout() {
         return layout;
     }
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowView.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowView.java
index 8f9b2dd6..b4acb6e1 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowView.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowView.java
@@ -11,7 +11,6 @@ package eu.etaxonomy.cdm.vaadin.view.registration;
 import java.util.UUID;
 
 import com.vaadin.ui.CssLayout;
-import com.vaadin.ui.Label;
 
 import eu.etaxonomy.cdm.vaadin.presenter.registration.RegistrationType;
 import eu.etaxonomy.vaadin.mvp.ApplicationView;
@@ -26,8 +25,6 @@ public interface RegistrationWorkflowView extends ApplicationView{
 
     CssLayout getWorkflow();
 
-    Label getTitle();
-
 
     /**
      * Open a popup editor for an existing TaxonName if the nameUuid is
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java
index 3d548003..cd8eb6fc 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java
@@ -16,14 +16,12 @@ import com.vaadin.navigator.View;
 import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
 import com.vaadin.spring.annotation.SpringView;
 import com.vaadin.ui.CssLayout;
-import com.vaadin.ui.Label;
 
-import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationWorkflowComponent;
 import eu.etaxonomy.cdm.vaadin.component.registration.WorkflowSteps;
 import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent;
 import eu.etaxonomy.cdm.vaadin.presenter.registration.RegistrationType;
 import eu.etaxonomy.cdm.vaadin.presenter.registration.RegistrationWorkflowPresenter;
-import eu.etaxonomy.vaadin.mvp.AbstractView;
+import eu.etaxonomy.cdm.vaadin.view.AbstractPageView;
 
 /**
  * @author a.kohlbecker
@@ -31,9 +29,18 @@ import eu.etaxonomy.vaadin.mvp.AbstractView;
  *
  */
 @SpringView(name=RegistrationWorkflowViewBean.NAME)
-public class RegistrationWorkflowViewBean extends AbstractView<RegistrationWorkflowPresenter>
+public class RegistrationWorkflowViewBean extends AbstractPageView<RegistrationWorkflowPresenter>
     implements RegistrationWorkflowView, View {
 
+    /**
+     *
+     */
+    private static final String CSS_CLASS_WORKFLOW = "workflow-container";
+
+    private static final String SUBHEADER_PREFIX = "Advance step by step through the registration workflow for scientific names.";
+
+    private static final String HEADER_PREFIX = "Registration of the ...";
+
     private static final long serialVersionUID = -213040114015958970L;
 
     public static final String NAME = "workflow";
@@ -44,11 +51,17 @@ public class RegistrationWorkflowViewBean extends AbstractView<RegistrationWorkf
 
     public RegistrationType regType = null;
 
-    RegistrationWorkflowComponent design;
+    CssLayout workflow;
+
+    String headerSuffix = "";
 
     public RegistrationWorkflowViewBean() {
-        design = new RegistrationWorkflowComponent();
-        setCompositionRoot(design);
+        super();
+
+        workflow = new CssLayout();
+        workflow.setSizeFull();
+        workflow.setId(CSS_CLASS_WORKFLOW);
+        getLayout().addComponent(workflow);
     }
 
     /**
@@ -61,14 +74,14 @@ public class RegistrationWorkflowViewBean extends AbstractView<RegistrationWorkf
 
            if(params[0].equals(ACTION_NEW)) {
                regType = RegistrationType.valueOf(params[1]);
-               design.getTitle().setValue(design.getTitle().getValue() + "  " + regType.name() + " ...");
+               headerSuffix = regType.name() + " ...";
                eventBus.publishEvent(new RegistrationWorkflowEvent(regType));
 
            } else if( params[0].equals(ACTION_EDIT)) {
-               design.getTitle().setValue(design.getTitle().getValue() + "  " + params[1]);
+               headerSuffix = params[1];
                eventBus.publishEvent(new RegistrationWorkflowEvent(Integer.parseInt(params[1])));
            }
-
+           updateHeader();
         }
     }
 
@@ -121,31 +134,38 @@ public class RegistrationWorkflowViewBean extends AbstractView<RegistrationWorkf
         setPresenter(presenter);
     }
 
-    /* ------- RegistrationWorkflowView implementation ------- */
-
     /**
-     * @return the title
+     * {@inheritDoc}
      */
     @Override
-    public Label getTitle() {
-        return design.getTitle();
+    public void openNameEditor(UUID nameUuid) {
+        // TODO Auto-generated method stub
+
     }
 
     /**
-     * @return the workflow
+     * {@inheritDoc}
      */
     @Override
-    public CssLayout getWorkflow() {
-        return design.getWorkflow();
+    protected String getHeaderText() {
+        return HEADER_PREFIX + " " + headerSuffix;
     }
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public void openNameEditor(UUID nameUuid) {
-        // TODO Auto-generated method stub
+    protected String getSubHeaderText() {
+        return SUBHEADER_PREFIX;
+    }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public CssLayout getWorkflow() {
+        return workflow;
     }
 
+
 }
diff --git a/src/main/resources/eu/etaxonomy/cdm/vaadin/design/registration/RegistrationWorkflowDesign.html b/src/main/resources/eu/etaxonomy/cdm/vaadin/design/registration/RegistrationWorkflowDesign.html
deleted file mode 100644
index 580f3351..00000000
--- a/src/main/resources/eu/etaxonomy/cdm/vaadin/design/registration/RegistrationWorkflowDesign.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <meta charset="UTF-8">
-  <meta name="design-properties" content="{&quot;RULERS_VISIBLE&quot;:true,&quot;GUIDELINES_VISIBLE&quot;:false,&quot;SNAP_TO_OBJECTS&quot;:true,&quot;SNAP_TO_GRID&quot;:true,&quot;SNAPPING_DISTANCE&quot;:10,&quot;JAVA_SOURCES_ROOT&quot;:&quot;src/main/java&quot;,&quot;THEME&quot;:&quot;edit-valo&quot;}">
-  <meta name="vaadin-version" content="7.7.0">
- </head>
- <body>
-  <vaadin-vertical-layout spacing>
-   <vaadin-label style-name="huge" size-auto plain-text _id="title" :center>
-     Registration of the 
-   </vaadin-label>
-   <vaadin-label size-auto plain-text :middle :center>
-     Advance step by step through the registration workflow for scientific names. 
-   </vaadin-label>
-   <vaadin-css-layout style-name="workflow" responsive _id="workflow" :center></vaadin-css-layout>
-  </vaadin-vertical-layout>
- </body>
-</html>
\ No newline at end of file
diff --git a/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss b/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
index 6a92b5dd..443d441e 100644
--- a/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
+++ b/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
@@ -141,6 +141,10 @@ $status-ready-color: adjust-color($plain-red, $hue: 180deg);
     }
 
     // ===== workflow ==== // 
+
+    #workflow-container {
+        text-align: center;
+    }
     
     $workflow-icon-size: 110px;
     // can not be set per css as this need to set as property to the component in vaadin
@@ -150,8 +154,8 @@ $status-ready-color: adjust-color($plain-red, $hue: 180deg);
 
     $workflow-icon-margin-h: $workflow-icon-size / 5;
     $workflow-icon-left: $workflow-icon-margin-h / 2;
-    $workflow-caption-font-size: $workflow-icon-size * $workflow-caption-shrink;
-        
+    $workflow-caption-font-size: $workflow-icon-size * $workflow-caption-shrink;        
+    
     .workflow {
         .steps {
             z-index: 10;
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 9691bca0..a0a3eb12 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -77,6 +77,6 @@
     <context-param>
       <description>Vaadin production mode</description>
       <param-name>productionMode</param-name>
-      <param-value>true</param-value>
+      <param-value>false</param-value>
     </context-param>
 </web-app>
