ref
[cdm-vaadin.git] / src / main / java / eu / etaxonomy / cdm / vaadin / ui / StatusEditorUI.java
index 7cf3bc21d3adc020f8d10967af3c72035f8e8f47..eacb3c21bdac5aee15ccad9c788b3950e1e239ce 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2015 EDIT
 * European Distributed Institute of Taxonomy
@@ -9,28 +8,29 @@
 */
 package eu.etaxonomy.cdm.vaadin.ui;
 
-/**
- * @author cmathew
- * @date 11 Mar 2015
- *
- */
-
 
 import java.util.logging.Logger;
 
 import javax.servlet.annotation.WebServlet;
 
 import com.vaadin.annotations.Theme;
-import com.vaadin.annotations.VaadinServletConfiguration;
+import com.vaadin.annotations.Widgetset;
 import com.vaadin.navigator.Navigator;
-import com.vaadin.server.VaadinServlet;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.spring.annotation.SpringUI;
+import com.vaadin.spring.server.SpringVaadinServlet;
 import com.vaadin.ui.UI;
 
 import eu.etaxonomy.cdm.vaadin.component.StatusComposite;
 
-
+/**
+ * @author cmathew
+ * @date 11 Mar 2015
+ *
+ */
 @Theme("edit")
-
+@SpringUI(path="editstatus")
+@Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet")
 public class StatusEditorUI extends AbstractAuthenticatedUI {
 
     Navigator navigator;
@@ -39,14 +39,17 @@ public class StatusEditorUI extends AbstractAuthenticatedUI {
 
     private final static Logger logger =
             Logger.getLogger(StatusEditorUI.class.getName());
-
-    @WebServlet(value = {"/app/editstatus/*"}, asyncSupported = true)
-    @VaadinServletConfiguration(productionMode = true, ui = StatusEditorUI.class, widgetset = "eu.etaxonomy.cdm.vaadin.AppWidgetSet")
-    public static class Servlet extends VaadinServlet {
+    /*
+     * NOTE: It is necessary to map the URLs starting with /VAADIN/* since none of the
+     * @WebServlets is mapped to the root path. It is sufficient to configure one of the
+     * servlets with this path see BookOfVaadin 5.9.5. Servlet Mapping with URL Patterns
+     */
+    @WebServlet(value = {"/app/*", "/VAADIN/*"}, asyncSupported = true)
+    public static class Servlet extends SpringVaadinServlet {
     }
 
     @Override
-    protected void doInit() {
+    protected void doInit(VaadinRequest request) {
         // FIXME: remove this when testing is done
         //setIgnoreAuthentication(true);