Project

General

Profile

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

    
11

    
12
import org.apache.log4j.Logger;
13

    
14
import com.vaadin.annotations.Theme;
15
import com.vaadin.annotations.Widgetset;
16
import com.vaadin.navigator.Navigator;
17
import com.vaadin.server.VaadinRequest;
18
import com.vaadin.ui.UI;
19

    
20
import eu.etaxonomy.cdm.vaadin.view.ConceptRelationshipView;
21

    
22
/**
23
 * @author cmathew
24
 * @date 9 Apr 2015
25
 *
26
 */
27
@Theme("edit")
28
// @SpringUI(path="concept") // not needed since this UI is used in the context of ConceptRelationshipUI
29
@Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet")
30
public class ConceptRelationshipUIRedirect extends AbstractAuthenticatedUI {
31

    
32
    Navigator navigator;
33

    
34
    private static final String FIRST_VIEW = "editcr";
35

    
36
    private final static Logger logger = Logger.getLogger(ConceptRelationshipUIRedirect.class);
37

    
38
    @Override
39
    protected void doInit(VaadinRequest request) {
40
        // FIXME: remove this when testing is done
41
        //setIgnoreAuthentication(true);
42

    
43
        getPage().setTitle("Concept Relationship Editor");
44
        logger.warn("original classification : " + request.getParameter("oc"));
45
        logger.warn("copy classification : " + request.getParameter("cc"));
46
        String oc = request.getParameter("oc");
47
        String cc = request.getParameter("cc");
48

    
49
        ConceptRelationshipView crEditor = new ConceptRelationshipView(oc,cc);
50
        UI.getCurrent().getNavigator().addView(FIRST_VIEW, crEditor);
51

    
52
    }
53

    
54
    @Override
55
    public String getFirstViewName() {
56
        return FIRST_VIEW;
57
    }
58

    
59
}
(4-4/8)