1 |
683a331c
|
Andreas Kohlbecker
|
/**
|
2 |
|
|
* Copyright (C) 2017 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 |
eaee371d
|
Andreas Kohlbecker
|
package eu.etaxonomy.cdm.vaadin.view.registration;
|
10 |
683a331c
|
Andreas Kohlbecker
|
|
11 |
|
|
import javax.annotation.PostConstruct;
|
12 |
|
|
|
13 |
|
|
import com.vaadin.navigator.View;
|
14 |
|
|
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
|
15 |
157460f4
|
Andreas Kohlbecker
|
import com.vaadin.spring.annotation.SpringView;
|
16 |
683a331c
|
Andreas Kohlbecker
|
import com.vaadin.ui.Label;
|
17 |
|
|
import com.vaadin.ui.VerticalLayout;
|
18 |
|
|
|
19 |
|
|
/**
|
20 |
|
|
* @author a.kohlbecker
|
21 |
|
|
* @since Feb 24, 2017
|
22 |
|
|
*
|
23 |
|
|
*/
|
24 |
9a2ea914
|
Andreas Kohlbecker
|
@SpringView(name=TestView2.NAME)
|
25 |
157460f4
|
Andreas Kohlbecker
|
/*
|
26 |
|
|
* MenuBeanDiscovery is not yet working with spring!!!!!
|
27 |
683a331c
|
Andreas Kohlbecker
|
@SpringComponent
|
28 |
|
|
@Scope(scopeName = ViewScopeImpl.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.TARGET_CLASS)
|
29 |
157460f4
|
Andreas Kohlbecker
|
@MenuItem(name="test", icon=FontAwesome.INFO_CIRCLE, order = 0)
|
30 |
|
|
*/
|
31 |
9a2ea914
|
Andreas Kohlbecker
|
public class TestView2 extends VerticalLayout implements View {
|
32 |
683a331c
|
Andreas Kohlbecker
|
|
33 |
9a2ea914
|
Andreas Kohlbecker
|
public static final String NAME = "test2";
|
34 |
157460f4
|
Andreas Kohlbecker
|
|
35 |
683a331c
|
Andreas Kohlbecker
|
private static final long serialVersionUID = 6152530138547633828L;
|
36 |
|
|
|
37 |
9a2ea914
|
Andreas Kohlbecker
|
public TestView2(){
|
38 |
|
|
setWidth(100, Unit.PERCENTAGE);
|
39 |
|
|
setMargin(true);
|
40 |
|
|
this.addComponent(new Label("This is another test"));
|
41 |
683a331c
|
Andreas Kohlbecker
|
}
|
42 |
|
|
|
43 |
|
|
@PostConstruct
|
44 |
|
|
protected void initialize() {
|
45 |
|
|
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
/**
|
49 |
|
|
* {@inheritDoc}
|
50 |
|
|
*/
|
51 |
|
|
@Override
|
52 |
|
|
public void enter(ViewChangeEvent event) {
|
53 |
|
|
// TODO Auto-generated method stub
|
54 |
|
|
|
55 |
|
|
}
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
}
|