Project

General

Profile

Download (1.67 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.VaadinRequest;
27
import com.vaadin.server.VaadinServlet;
28
import com.vaadin.ui.UI;
29

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

    
32

    
33
@Theme("edit")
34

    
35
public class StatusEditorUI extends AbstractAuthenticatedUI {
36

    
37
    Navigator navigator;
38

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

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

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

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

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

    
58
    }
59

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

    
65
}
(6-6/6)