Project

General

Profile

Download (1.61 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2015 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.vaadin.ui;
11

    
12
/**
13
 * @author cmathew
14
 * @date 11 Mar 2015
15
 *
16
 */
17

    
18

    
19
import java.util.logging.Logger;
20

    
21
import javax.servlet.annotation.WebServlet;
22

    
23
import com.vaadin.annotations.Theme;
24
import com.vaadin.annotations.VaadinServletConfiguration;
25
import com.vaadin.navigator.Navigator;
26
import com.vaadin.server.VaadinServlet;
27
import com.vaadin.ui.UI;
28

    
29
import eu.etaxonomy.cdm.vaadin.component.StatusComposite;
30

    
31

    
32
@Theme("edit")
33

    
34
public class StatusEditorUI extends AbstractAuthenticatedUI {
35

    
36
    Navigator navigator;
37

    
38
    private static final String FIRST_VIEW = "editstatus";
39

    
40
    private final static Logger logger =
41
            Logger.getLogger(StatusEditorUI.class.getName());
42

    
43
    @WebServlet(value = {"/app/editstatus/*"}, asyncSupported = true)
44
    @VaadinServletConfiguration(productionMode = true, ui = StatusEditorUI.class, widgetset = "eu.etaxonomy.cdm.vaadin.AppWidgetSet")
45
    public static class Servlet extends VaadinServlet {
46
    }
47

    
48
    @Override
49
    protected void doInit() {
50
        // FIXME: remove this when testing is done
51
        //setIgnoreAuthentication(true);
52

    
53
        getPage().setTitle("Status Editor");
54
        StatusComposite statusEditor = new StatusComposite();
55
        UI.getCurrent().getNavigator().addView(FIRST_VIEW, statusEditor);
56

    
57
    }
58

    
59
    @Override
60
    public String getFirstViewName() {
61
        return FIRST_VIEW;
62
    }
63

    
64
}
(6-6/6)