cleanup
[cdm-vaadin.git] / src / test / java / eu / etaxonomy / cdm / vaadin / ui / NavigatorTestUI.java
index cd46c38569d49449c5bf9da8e5be8590f3188a9e..a8ef66a38a8b24fc22d5d46d9a238805159d7c66 100644 (file)
@@ -1,53 +1,53 @@
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
 package eu.etaxonomy.cdm.vaadin.ui;
 
-import java.util.logging.Logger;
-
-import javax.servlet.annotation.WebServlet;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import com.vaadin.annotations.Theme;
-import com.vaadin.annotations.VaadinServletConfiguration;
-import com.vaadin.navigator.Navigator;
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.spring.annotation.SpringUI;
 import com.vaadin.ui.UI;
 
-import eu.etaxonomy.cdm.vaadin.servlet.CdmVaadinConversationalServlet;
 import eu.etaxonomy.cdm.vaadin.view.NaviTestView;
 
-@Theme("chameleon")
+@Theme("edit")
+@SpringUI(path="navi")
+@Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet")
 public class NavigatorTestUI extends AbstractAuthenticatedUI {
-       
-       Navigator navigator;
-       
+
+       private static final long serialVersionUID = 4959469489638235995L;
+       @SuppressWarnings("unused")
+       private static final Logger logger = LogManager.getLogger();
+
        private static final String FIRST_VIEW = "firstView";
        public static final String SECOND_VIEW = "secondView";
-       
-       private final static Logger logger =
-                       Logger.getLogger(NavigatorTestUI.class.getName());
-
-       @WebServlet(value = {"/app-test/navi/*"}, asyncSupported = true)
-       @VaadinServletConfiguration(productionMode = false, ui = NavigatorTestUI.class, widgetset = "eu.etaxonomy.cdm.vaadin.AppWidgetSet")
-       public static class Servlet extends CdmVaadinConversationalServlet {
-               
-       }
 
        @Override
-       protected void doInit() {
+       protected void doInit(VaadinRequest request) {
                getPage().setTitle("Navigation Example");
                NaviTestView ntv1 = new NaviTestView();
                ntv1.setText("Congratulations! you have reached the first view. If you have got here without logging in there we are in trouble :)");
-               
+
                NaviTestView ntv2 = new NaviTestView();
-               ntv2.setText("Wow! you made it to the second view. Get yourself a beer - preferably a Kruลกovice Cerne");
-               
+               ntv2.setText("Wow! you made it to the second view. Get yourself a beer - preferably a Krusovice Cerne");
+
                ntv2.removeButton();
-               
-        UI.getCurrent().getNavigator().addView(FIRST_VIEW, ntv1);  
-        UI.getCurrent().getNavigator().addView(SECOND_VIEW, ntv2);  
-               
+
+        UI.getCurrent().getNavigator().addView(FIRST_VIEW, ntv1);
+        UI.getCurrent().getNavigator().addView(SECOND_VIEW, ntv2);
        }
 
        @Override
        public String getFirstViewName() {
                return FIRST_VIEW;
        }
-
-}
+}
\ No newline at end of file