Java Code Examples for com.vaadin.ui.MenuBar#addItem()
The following examples show how to use
com.vaadin.ui.MenuBar#addItem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DashboardMenu.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private Component buildUserMenu(final UiProperties uiProperties) { final MenuBar settings = new MenuBar(); settings.addStyleName("user-menu"); settings.setHtmlContentAllowed(true); final MenuItem settingsItem = settings.addItem("", getImage(uiProperties.isGravatar()), null); final String formattedTenant = UserDetailsFormatter.formatCurrentTenant(); if (!StringUtils.isEmpty(formattedTenant)) { settingsItem.setText(formattedTenant); UserDetailsFormatter.getCurrentTenant().ifPresent(tenant -> settingsItem.setDescription(i18n .getMessage("menu.user.description", tenant, UserDetailsFormatter.getCurrentUser().getUsername()))); } else { settingsItem.setText("..."); } settingsItem.setStyleName("user-menuitem"); final String logoutUrl = generateLogoutUrl(); settingsItem.addItem(i18n.getMessage("label.sign.out"), selectedItem -> Page.getCurrent().setLocation(logoutUrl)); return settings; }
Example 2
Source File: AbstractMenuItemFactoryImpl.java From cia with Apache License 2.0 | 6 votes |
/** * Inits the application menu bar. * * @param menuBar * the menu bar */ protected final void initApplicationMenuBar(final MenuBar menuBar) { menuBar.removeItems(); menuBar.setWidth(MENU_BAR_WIDTH); menuBar.setStyleName(HEADER_STYLE_NAME); final MenuItem mainViewItem = menuBar.addItem(APPLICATION, VaadinIcons.SERVER, null); mainViewItem.addItem(START_TEXT, VaadinIcons.STAR, COMMAND_MAINVIEW_OVERVIEW); final MenuItem mainItem = mainViewItem.addItem(MAIN, VaadinIcons.STAR, null); mainItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.LINE_CHART, COMMAND_MAINVIEW_PAGEVISITHISTORY); if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN) || UserContextUtil.allowRoleInSecurityContext(ROLE_USER)) { mainViewItem.addItem(USERHOME, VaadinIcons.USER,COMMAND_USERHOME); createAdminMenu(mainViewItem); mainViewItem.addItem(LOGOUT, VaadinIcons.SIGN_OUT, COMMAND_LOGOUT); } else { mainViewItem.addItem(LOGIN, VaadinIcons.SIGN_IN, COMMAND_LOGIN); mainViewItem.addItem(REGISTER, VaadinIcons.FILE_ADD, COMMAND_REGISTER); } }
Example 3
Source File: DocumentMenuItemFactoryImpl.java From cia with Apache License 2.0 | 5 votes |
@Override public void createDocumentsMenuBar(final MenuBar menuBar) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); final MenuItem documentsItem = menuBar.addItem(DOCUMENTS, VaadinIcons.FILE, null); documentsItem.addItem("List all",VaadinIcons.GROUP, COMMAND_DOCUMENTS); documentsItem.addItem("Search Documents",VaadinIcons.GROUP, COMMAND_SEARCH_DOCUMENT); }
Example 4
Source File: BallotMenuItemFactoryImpl.java From cia with Apache License 2.0 | 5 votes |
@Override public void createBallotMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); menuBar.addItem(OVERVIEW_TEXT, VaadinIcons.PIE_CHART, new PageModeMenuCommand(UserViews.BALLOT_VIEW_NAME, PageMode.OVERVIEW, pageId)); menuBar.addItem(CHARTS_TEXT, VaadinIcons.PIE_CHART, new PageModeMenuCommand(UserViews.BALLOT_VIEW_NAME, PageMode.CHARTS, pageId)); }
Example 5
Source File: UserHomeMenuItemFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Override public void createUserHomeMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); final MenuItem accountItem = menuBar.addItem("Useraccount", VaadinIcons.USER,null); accountItem.addItem(OVERVIEW_TEXT, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, PageMode.OVERVIEW, pageId)); accountItem.addItem(SECURITY_SETTING_TEXT, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.SECURITY_SETTINGS.toString(), pageId)); accountItem.addItem(USER_VISITS, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.USER_VISITS.toString(), pageId)); accountItem.addItem(USER_EVENTS, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.USER_EVENTS.toString(), pageId)); }
Example 6
Source File: ApplicationMenuItemFactoryImpl.java From cia with Apache License 2.0 | 3 votes |
@Override public void addRankingMenu(final MenuBar menuBar) { final MenuItem rankingsMenuItem = menuBar.addItem(RANKING_TEXT, VaadinIcons.LINE_CHART, null); final MenuItem countryMenuItem = rankingsMenuItem.addItem(COUNTRY_RANKING_LINK_TEXT,VaadinIcons.FLAG, COMMAND_COUNTRY_RANKING_OVERVIEW); countryMenuItemFactory.createCountryTopicMenu(countryMenuItem); final MenuItem parliamentMenuItem = rankingsMenuItem.addItem(PARLIAMENT_RANKING_LINK_TEXT,VaadinIcons.INSTITUTION, COMMAND_PARLIAMENT_RANKING_OVERVIEW); parliamentMenuItemFactory.createParliamentTopicMenu(parliamentMenuItem); final MenuItem politicianMenuItem = rankingsMenuItem.addItem(POLITICIAN_RANKING_LINK_TEXT,VaadinIcons.USER, COMMAND_POLITICIAN_RANKING_OVERVIEW); politicianRankingMenuItemFactory.createPoliticianRankingTopics(politicianMenuItem); final MenuItem partynMenuItem = rankingsMenuItem.addItem(PARTY_RANKING_LINK_TEXT, VaadinIcons.GROUP,COMMAND_PARTY_RANKING_OVERVIEW); partyRankingMenuItemFactory.createPartyRankingTopics(partynMenuItem); final MenuItem committeeMenuItem = rankingsMenuItem.addItem(COMMITTEE_RANKING_LINK_TEXT,VaadinIcons.GROUP, COMMAND_COMMITTEE_RANKING_OVERVIEW); committeeRankingMenuItemFactory.createCommitteeRankingTopics(committeeMenuItem); final MenuItem ministryMenuItem = rankingsMenuItem.addItem(MINISTRY_RANKING_LINK_TEXT,VaadinIcons.GROUP, COMMAND_MINISTRY_RANKING_OVERVIEW); ministryRankingMenuItemFactory.createMinistryRankingTopics(ministryMenuItem); final MenuItem govbodyMenuItem = rankingsMenuItem.addItem(GOVERNMENT_BODY_RANKING,VaadinIcons.GROUP, COMMAND_GOVERNMENT_BODY_RANKING_OVERVIEW); governmentBodyRankingMenuItemFactory.createGovernmentBodyRankingTopics(govbodyMenuItem); final MenuItem documentsMenuItem = rankingsMenuItem.addItem(DOCUMENTS,VaadinIcons.GROUP, COMMAND_DOCUMENTS); documentsMenuItem.addItem("List all",VaadinIcons.GROUP, COMMAND_DOCUMENTS); documentsMenuItem.addItem(SEARCH_DOCUMENTS,VaadinIcons.GROUP, COMMAND_SEARCH_DOCUMENT); }
Example 7
Source File: GovernmentBodyMenuItemFactoryImpl.java From cia with Apache License 2.0 | 3 votes |
@Override public void createGovernmentBodyMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); governmentBodyRankingMenuItemFactory.createGovernmentBodyRankingTopics(menuBar.addItem(GOVERNMENT_BODY_RANKING, VaadinIcons.GROUP,null)); final MenuItem governmentBodyItem = menuBar.addItem("GovernmentBody "+ pageId, VaadinIcons.GROUP,null); governmentBodyItem.addItem(OVERVIEW_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.GOVERNMENT_BODY_VIEW_NAME, PageMode.OVERVIEW, pageId)); governmentBodyItem.addItem(HEADCOUNT_CHART, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.GOVERNMENT_BODY_VIEW_NAME, GovernmentBodyPageMode.HEADCOUNT.toString(), pageId)); governmentBodyItem.addItem(INCOME, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.GOVERNMENT_BODY_VIEW_NAME, GovernmentBodyPageMode.INCOME.toString(), pageId)); governmentBodyItem.addItem(EXPENDITURE, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.GOVERNMENT_BODY_VIEW_NAME, GovernmentBodyPageMode.EXPENDITURE.toString(), pageId)); governmentBodyItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.GOVERNMENT_BODY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); }
Example 8
Source File: DocumentMenuItemFactoryImpl.java From cia with Apache License 2.0 | 3 votes |
@Override public void createDocumentMenuBar(final MenuBar menuBar, final String pageId) { createDocumentsMenuBar(menuBar); final MenuItem documentItem = menuBar.addItem(DOCUMENT, VaadinIcons.FILE, null); documentItem.addItem(OVERVIEW_TEXT, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, PageMode.OVERVIEW, pageId)); documentItem.addItem(DOCUMENT_ACTIVITY_TEXT, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTACTIVITY.toString(), pageId)); documentItem.addItem(PERSON_REFERENCES, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.PERSONREFERENCES.toString(), pageId)); documentItem.addItem(DOCUMENT_DETAILS, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTDETAILS.toString(), pageId)); documentItem.addItem(DOCUMENT_DATA, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTDATA.toString(), pageId)); documentItem.addItem(DOCUMENT_REFERENCES, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTREFERENCES.toString(), pageId)); documentItem.addItem(DOCUMENT_DECISION, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTDECISION.toString(), pageId)); documentItem.addItem(DOCUMENT_ATTACHEMENTS, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTATTACHMENTS.toString(), pageId)); documentItem.addItem(PAGE_VISIT_HISTORY_TEXT, null, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, PageMode.PAGEVISITHISTORY,pageId)); }
Example 9
Source File: MinistryMenuItemFactoryImpl.java From cia with Apache License 2.0 | 2 votes |
@Override public void createMinistryMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); ministryRankingMenuItemFactory.createMinistryRankingTopics(menuBar.addItem(MINISTRY_RANKING, VaadinIcons.GROUP,null)); final MenuItem ministryItem = menuBar.addItem("Ministry "+ pageId, VaadinIcons.GROUP,null); ministryItem.addItem(OVERVIEW_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, PageMode.OVERVIEW, pageId)); final MenuItem rolesItem = ministryItem.addItem(ROLES_TEXT, VaadinIcons.GROUP, null); rolesItem.addItem(CURRENT_MEMBERS_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.CURRENTMEMBERS.toString(), pageId)); rolesItem.addItem(MEMBER_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.MEMBERHISTORY.toString(), pageId)); rolesItem.addItem(ROLE_GHANT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.ROLEGHANT.toString(), pageId)); rolesItem.addItem(GOVERNMENT_BODIES_HEADCOUNT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.GOVERNMENT_BODIES_HEADCOUNT.toString(), pageId)); rolesItem.addItem(GOVERNMENT_BODIES_INCOME, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.GOVERNMENT_BODIES_INCOME.toString(), pageId)); rolesItem.addItem(GOVERNMENT_BODIES_EXPENDITURE, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.GOVERNMENT_BODIES_EXPENDITURE.toString(), pageId)); final MenuItem documentItem = ministryItem.addItem(DOCUMENTS_TEXT, VaadinIcons.GROUP, null); documentItem.addItem(DOCUMENT_ACTIVITY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.DOCUMENTACTIVITY.toString(), pageId)); documentItem.addItem(DOCUMENT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.DOCUMENTHISTORY.toString(), pageId)); ministryItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); }
Example 10
Source File: PoliticianMenuItemFactoryImpl.java From cia with Apache License 2.0 | 2 votes |
@Override public void createPoliticianMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); politicianRankingMenuItemFactory.createPoliticianRankingTopics(menuBar.addItem(POLITICIAN_RANKING, VaadinIcons.BUG, null)); final MenuItem politicanItem = menuBar.addItem("Politician "+ pageId, VaadinIcons.BUG,null); politicanItem.addItem(OVERVIEW_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PageMode.OVERVIEW, pageId)); politicanItem.addItem(INDICATORS_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PageMode.INDICATORS, pageId)); final MenuItem rolesItem = politicanItem.addItem(ROLES_TEXT, VaadinIcons.BUG, null); rolesItem.addItem(TOTAL_EXPERIENCE, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.ROLESUMMARY.toString(), pageId)); rolesItem.addItem(ROLE_LIST, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.ROLELIST.toString(), pageId)); rolesItem.addItem(ROLE_GHANT_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.ROLEGHANT.toString(), pageId)); final MenuItem documentItem = politicanItem.addItem(DOCUMENTS_TEXT, VaadinIcons.BUG, null); documentItem.addItem(DOCUMENT_ACTIVITY_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.DOCUMENTACTIVITY.toString(), pageId)); documentItem.addItem(DOCUMENT_HISTORY_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.DOCUMENTHISTORY.toString(), pageId)); final MenuItem ballotItem = politicanItem.addItem(BALLOTS_TEXT, VaadinIcons.BUG, null); ballotItem.addItem(VOTE_HISTORY, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.VOTEHISTORY.toString(), pageId)); ballotItem.addItem(BALLOT_DECISION_SUMMARY_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.BALLOTDECISIONSUMMARY.toString(), pageId)); politicanItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.BUG, new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PageMode.PAGEVISITHISTORY,pageId)); }
Example 11
Source File: PartyMenuItemFactoryImpl.java From cia with Apache License 2.0 | 2 votes |
@Override public void createPartyMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); partyRankingMenuItemFactory.createPartyRankingTopics(menuBar.addItem(PARTY_RANKING, VaadinIcons.GROUP,null)); final MenuItem partyItem = menuBar.addItem("Party "+ pageId, VaadinIcons.GROUP,null); partyItem.addItem(OVERVIEW_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PageMode.OVERVIEW, pageId)); final MenuItem rolesItem = partyItem.addItem(ROLES_TEXT, VaadinIcons.GROUP, null); rolesItem.addItem(CURRENT_LEADERS, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.CURRENTLEADERS.toString(), pageId)); rolesItem.addItem(LEADER_HISTORY, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.LEADERHISTORY.toString(), pageId)); rolesItem.addItem(CURRENT_MEMBERS_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.CURRENTMEMBERS.toString(), pageId)); rolesItem.addItem(MEMBER_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.MEMBERHISTORY.toString(), pageId)); rolesItem.addItem(GOVERMENT_ROLES, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.GOVERNMENTROLES.toString(), pageId)); rolesItem.addItem(COMMITTEE_ROLES, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.COMMITTEEROLES.toString(), pageId)); rolesItem.addItem(ROLE_CHART_PARTY_LEADERS, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.ROLEGHANT.toString(), pageId)); final MenuItem documentItem = partyItem.addItem(DOCUMENTS_TEXT, VaadinIcons.GROUP, null); documentItem.addItem(DOCUMENT_ACTIVITY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.DOCUMENTACTIVITY.toString(), pageId)); documentItem.addItem(DOCUMENT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.DOCUMENTHISTORY.toString(), pageId)); final MenuItem ballotItem = partyItem.addItem(BALLOTS_TEXT, VaadinIcons.GROUP, null); ballotItem.addItem(VOTE_HISTORY, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.VOTEHISTORY.toString(), pageId)); ballotItem.addItem(BALLOT_DECISION_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.COMMITTEEBALLOTDECISIONSUMMARY.toString(), pageId)); ballotItem.addItem(PARTY_WON_DAILY_SUMMARY_CHART, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.PARTYWONDAILYSUMMARYCHART.toString(), pageId)); ballotItem.addItem(PartyPageMode.PARTYAGAINSTCOALATIONSSUMMARY.toString(), VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.PARTYAGAINSTCOALATIONSSUMMARY.toString(), pageId)); ballotItem.addItem(PartyPageMode.PARTYSUPPORTSUMMARY.toString(), VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.PARTYSUPPORTSUMMARY.toString(), pageId)); partyItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); }
Example 12
Source File: CommitteeMenuItemFactoryImpl.java From cia with Apache License 2.0 | 2 votes |
@Override public void createCommitteeeMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar); applicationMenuItemFactory.addRankingMenu(menuBar); committeeRankingMenuItemFactory.createCommitteeRankingTopics(menuBar.addItem(COMMITTEE_RANKING_TEXT, VaadinIcons.GROUP, null)); final MenuItem committeeItem = menuBar.addItem("Committee "+ pageId, VaadinIcons.GROUP,null); committeeItem.addItem(OVERVIEW_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, PageMode.OVERVIEW, pageId)); final MenuItem rolesItem = committeeItem.addItem(ROLES_TEXT, VaadinIcons.GROUP, null); rolesItem.addItem(CURRENT_MEMBERS_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.CURRENT_MEMBERS.toString(), pageId)); rolesItem.addItem(MEMBER_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.MEMBERHISTORY.toString(), pageId)); rolesItem.addItem(ROLE_GHANT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.ROLEGHANT.toString(), pageId)); final MenuItem documentItem = committeeItem.addItem(DOCUMENTS_TEXT, VaadinIcons.GROUP, null); documentItem.addItem(DOCUMENT_ACTIVITY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DOCUMENTACTIVITY.toString(), pageId)); documentItem.addItem(DOCUMENT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DOCUMENT_HISTORY.toString(), pageId)); final MenuItem ballotItem = committeeItem.addItem(BALLOTS_TEXT, VaadinIcons.GROUP, null); ballotItem.addItem(BALLOT_DECISION_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.BALLOTDECISIONSUMMARY.toString(), pageId)); ballotItem.addItem(DECISION_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DECISIONSUMMARY.toString(), pageId)); ballotItem.addItem(DECISION_TYPE_DAILY_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand( UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DECISIONTYPEDAILYSUMMARY.toString(), pageId)); ballotItem.addItem("Decision flow", VaadinIcons.GROUP, new PageModeMenuCommand( UserViews.COMMITTEE_VIEW_NAME, PageMode.CHARTS+"/"+ ChartIndicators.DECISION_FLOW_CHART, pageId)); committeeItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); }