Project

General

Profile

« Previous | Next » 

Revision 9a2ea914

Added by Andreas Kohlbecker about 7 years ago

manual testing of working navigation

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/ui/RegistrationUI.java
26 26
import com.vaadin.ui.UI;
27 27
import com.vaadin.ui.themes.ValoTheme;
28 28

  
29
import eu.etaxonomy.cdm.vaadin.view.phycobank.TestView;
29
import eu.etaxonomy.cdm.vaadin.view.phycobank.TestView1;
30
import eu.etaxonomy.cdm.vaadin.view.phycobank.TestView2;
30 31

  
31 32
/**
32 33
 * @author a.kohlbecker
......
70 71

  
71 72
        setContent((Component) viewDisplay);
72 73

  
73
        mainMenu.addMenuItem(TestView.NAME, FontAwesome.AMBULANCE, TestView.NAME);
74
        mainMenu.addMenuItem(TestView1.NAME, FontAwesome.AMBULANCE, TestView1.NAME);
75
        mainMenu.addMenuItem(TestView2.NAME, FontAwesome.APPLE, TestView2.NAME);
74 76

  
75 77
        eventBus.publishEvent(new UIInitializedEvent());
76 78
    }
src/main/java/eu/etaxonomy/cdm/vaadin/view/phycobank/TestView.java
1
/**
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
package eu.etaxonomy.cdm.vaadin.view.phycobank;
10

  
11
import javax.annotation.PostConstruct;
12

  
13
import com.vaadin.navigator.View;
14
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
15
import com.vaadin.spring.annotation.SpringView;
16
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
@SpringView(name=TestView.NAME)
25
/*
26
 * MenuBeanDiscovery is not yet working with spring!!!!!
27
@SpringComponent
28
@Scope(scopeName = ViewScopeImpl.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.TARGET_CLASS)
29
@MenuItem(name="test", icon=FontAwesome.INFO_CIRCLE, order = 0)
30
*/
31
public class TestView extends VerticalLayout  implements View {
32

  
33
    public static final String NAME = "test1";
34

  
35
    private static final long serialVersionUID = 6152530138547633828L;
36

  
37
    public TestView(){
38
        Label label = new Label();
39
        label.setDescription("This is only a test!");
40
        this.addComponent(label);
41
    }
42

  
43
    @PostConstruct
44
    protected void initialize() {
45

  
46

  
47
    }
48

  
49
    /**
50
     * {@inheritDoc}
51
     */
52
    @Override
53
    public void enter(ViewChangeEvent event) {
54
        // TODO Auto-generated method stub
55

  
56
    }
57

  
58

  
59

  
60
}
src/main/java/eu/etaxonomy/cdm/vaadin/view/phycobank/TestView1.java
1
/**
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
package eu.etaxonomy.cdm.vaadin.view.phycobank;
10

  
11
import javax.annotation.PostConstruct;
12

  
13
import com.vaadin.navigator.View;
14
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
15
import com.vaadin.spring.annotation.SpringView;
16
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
@SpringView(name=TestView1.NAME)
25
/*
26
 * MenuBeanDiscovery is not yet working with spring!!!!!
27
@SpringComponent
28
@Scope(scopeName = ViewScopeImpl.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.TARGET_CLASS)
29
@MenuItem(name="test", icon=FontAwesome.INFO_CIRCLE, order = 0)
30
*/
31
public class TestView1 extends VerticalLayout  implements View {
32

  
33
    public static final String NAME = "test1";
34

  
35
    private static final long serialVersionUID = 6152530138547633828L;
36

  
37
    public TestView1(){
38
        setWidth(100, Unit.PERCENTAGE);
39
        setMargin(true);
40
        this.addComponent(new Label("This is only a test!"));
41
    }
42

  
43
    @PostConstruct
44
    protected void initialize() {
45
    }
46

  
47
    /**
48
     * {@inheritDoc}
49
     */
50
    @Override
51
    public void enter(ViewChangeEvent event) {
52
        // TODO Auto-generated method stub
53

  
54
    }
55

  
56

  
57

  
58
}
src/main/java/eu/etaxonomy/cdm/vaadin/view/phycobank/TestView2.java
1
/**
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
package eu.etaxonomy.cdm.vaadin.view.phycobank;
10

  
11
import javax.annotation.PostConstruct;
12

  
13
import com.vaadin.navigator.View;
14
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
15
import com.vaadin.spring.annotation.SpringView;
16
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
@SpringView(name=TestView2.NAME)
25
/*
26
 * MenuBeanDiscovery is not yet working with spring!!!!!
27
@SpringComponent
28
@Scope(scopeName = ViewScopeImpl.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.TARGET_CLASS)
29
@MenuItem(name="test", icon=FontAwesome.INFO_CIRCLE, order = 0)
30
*/
31
public class TestView2 extends VerticalLayout  implements View {
32

  
33
    public static final String NAME = "test2";
34

  
35
    private static final long serialVersionUID = 6152530138547633828L;
36

  
37
    public TestView2(){
38
        setWidth(100, Unit.PERCENTAGE);
39
        setMargin(true);
40
        this.addComponent(new Label("This is another test"));
41
    }
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
}

Also available in: Unified diff