Revision 4f8aab68
Added by Andreas Kohlbecker over 2 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/ui/RegistrationUI.java | ||
---|---|---|
59 | 59 |
@Qualifier("viewAreaBean") |
60 | 60 |
private ViewDisplay viewDisplay; |
61 | 61 |
|
62 |
//---- pull into abstract super class ? --------- |
|
62 |
//---- pull into abstract super class AbstractApplicationUI ? ---------
|
|
63 | 63 |
|
64 | 64 |
@Autowired |
65 | 65 |
private MainMenu mainMenu; |
... | ... | |
77 | 77 |
|
78 | 78 |
public static final String INITIAL_VIEW = DashBoardView.NAME; |
79 | 79 |
|
80 |
|
|
81 |
//--------------------------------------------- |
|
80 |
protected static final String UI_STYLE_NAME = ValoTheme.UI_WITH_MENU; |
|
82 | 81 |
|
83 | 82 |
public RegistrationUI() { |
84 |
|
|
83 |
super(); |
|
85 | 84 |
} |
86 | 85 |
|
87 | 86 |
@Override |
... | ... | |
89 | 88 |
|
90 | 89 |
super.init(request); |
91 | 90 |
|
91 |
addStyleName(UI_STYLE_NAME); |
|
92 | 92 |
if(entityCacheDebugger != null){ |
93 | 93 |
addShortcutListener(entityCacheDebugger.getShortcutListener()); |
94 | 94 |
} |
95 |
//navigate to initial view |
|
96 |
// String state = pageFragmentAsState(); |
|
97 |
|
|
98 |
|
|
99 |
// if(state == null){ |
|
100 |
// // the case when state != null is handled in the UI base class |
|
101 |
// eventBus.publishEvent(new NavigationEvent(INITIAL_VIEW)); |
|
102 |
// } |
|
103 | 95 |
} |
104 | 96 |
|
105 | 97 |
@Override |
... | ... | |
112 | 104 |
Label phycoBankLogo = new Label("PhycoBank"); |
113 | 105 |
phycoBankLogo.addStyleName("phycobank-green"); |
114 | 106 |
phycoBankLogo.addStyleName(ValoTheme.LABEL_HUGE); |
107 |
|
|
115 | 108 |
mainMenu.addMenuComponent(phycoBankLogo); |
116 | 109 |
|
117 | 110 |
mainMenu.addMenuItem("New", FontAwesome.EDIT, StartRegistrationViewBean.NAME ); |
... | ... | |
143 | 136 |
return null; |
144 | 137 |
} |
145 | 138 |
|
139 |
@Override |
|
140 |
protected String getInitialViewName() { |
|
141 |
return INITIAL_VIEW; |
|
142 |
} |
|
143 |
|
|
146 | 144 |
} |
Also available in: Unified diff
fix #8503 abstract base UI created