Java Code Examples for com.vaadin.ui.Panel#setCaption()

The following examples show how to use com.vaadin.ui.Panel#setCaption() . 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: CommitteeDecisionTypeDailySummaryPageModContentFactoryImpl2.java    From cia with Apache License 2.0 6 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters);
	getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);

	LabelFactory.createHeader2Label(panelContent, DECISION_TYPE_DAILY_SUMMARY);

	chartDataManager.createDecisionTypeChart(panelContent, viewRiksdagenCommittee.getEmbeddedId().getOrgCode());

	panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);
	return panelContent;

}
 
Example 2
Source File: UserHomeApplicationEventsPageModContentFactoryImpl.java    From cia with Apache License 2.0 5 votes vote down vote up
@Secured({ "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();
	final String pageId = getPageId(parameters);
	final Optional<UserAccount> userAccount = getActiveUserAccount();

	if (userAccount.isPresent()) {

		userHomeMenuItemFactory.createUserHomeMenuBar(menuBar, pageId);

		LabelFactory.createHeader2Label(panelContent, USER_EVENTS);

		final DataContainer<ApplicationActionEvent, Long> eventDataContainer = getApplicationManager()
				.getDataContainer(ApplicationActionEvent.class);

		getGridFactory().createBasicBeanItemGrid(panelContent, ApplicationActionEvent.class,
				eventDataContainer.findOrderedListByProperty(ApplicationActionEvent_.userId,
						userAccount.get().getUserId(), ApplicationActionEvent_.createdDate),
				APPLICATION_ACTION_EVENT, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

		panel.setCaption(NAME + "::" + USERHOME + USER_EVENTS);
	}

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_USER_HOME_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 3
Source File: MinistryCurrentMembersPageModContentFactoryImpl.java    From cia with Apache License 2.0 5 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final ViewRiksdagenMinistry viewRiksdagenMinistry = getItem(parameters);

	getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);

	LabelFactory.createHeader2Label(panelContent, CURRENT_MEMBERS);

	final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager()
			.getDataContainer(ViewRiksdagenGovermentRoleMember.class);

	getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenGovermentRoleMember.class,
			govermentRoleMemberDataContainer.findListByProperty(
					new Object[] { viewRiksdagenMinistry.getNameId(), Boolean.TRUE },
					ViewRiksdagenGovermentRoleMember_.detail, ViewRiksdagenGovermentRoleMember_.active),
			CURRENT_MEMBERS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

	panel.setCaption(NAME + "::" + MINISTRY + viewRiksdagenMinistry.getNameId());
	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 4
Source File: RegexpEditorComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private Panel buildPanelTester() {
	// common part: create layout
	panelTester = new Panel();
	panelTester.setCaption("Test The Expression");
	panelTester.setImmediate(false);
	panelTester.setWidth("-1px");
	panelTester.setHeight("-1px");
	
	// verticalLayout_2
	verticalLayout_2 = buildVerticalLayout_2();
	panelTester.setContent(verticalLayout_2);
	
	return panelTester;
}
 
Example 5
Source File: MinistryRankingCurrentMinistriesChartsPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);


	final HorizontalLayout chartLayout = new HorizontalLayout();
	chartLayout.setSizeFull();

	chartDataManager.createChartPanel(chartLayout,dataSeriesFactory.createMinistryChartTimeSeriesCurrent(),
			"Current Ministies, by headcount");
	panelContent.addComponent(chartLayout);

	panel.setCaption(NAME + "::" + CHARTS + parameters);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 6
Source File: PoliticianRankingChartsAllPartiesPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	getPoliticianRankingMenuItemFactory().createPoliticianRankingMenuBar(menuBar);

	chartDataManager
			.createChartPanel(panelContent,dataSeriesFactory.createPartyChartTimeSeriesAll(), "All");


	panel.setCaption(NAME + "::" + CHARTS);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER,
			NAME, parameters, pageId);

	return panelContent;

}
 
Example 7
Source File: GovernmentBodyRankingHeadCountPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getGovernmentBodyRankingMenuItemFactory().createGovernmentBodyRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);

	panel.setCaption(NAME + "::" + GOVERNMENT_BODIES + parameters);

	governmentBodyChartDataManager.createGovernmentBodyHeadcountSummaryChart(panelContent);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 8
Source File: GovernmentBodyRankingDataGridPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getGovernmentBodyRankingMenuItemFactory().createGovernmentBodyRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);

	final Map<Integer, List<GovernmentBodyAnnualSummary>> dataMap = esvApi.getData();

	final List<GovernmentBodyAnnualSummary> list = dataMap.get(2020);

	getGridFactory().createBasicBeanItemGrid(panelContent, GovernmentBodyAnnualSummary.class, list,
			GOVERNMENT_BODIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

	panel.setCaption(NAME + "::" + DATAGRID);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_GOVERNMENT_BODY_RANKING_VIEW,
			ApplicationEventGroup.USER, NAME, parameters, pageId);

	return panelContent;

}
 
Example 9
Source File: MinistryGovernmentBodiesIncomeModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final ViewRiksdagenMinistry viewRiksdagenMinistry = getItem(parameters);
	getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);

	LabelFactory.createHeader2Label(panelContent, GOVERNMENT_BODIES);

	governmentBodyChartDataManager.createMinistryGovernmentBodyIncomeSummaryChart(panelContent,
			viewRiksdagenMinistry.getNameId());

	panel.setCaption(NAME + "::" + MINISTRY + viewRiksdagenMinistry.getNameId());
	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 10
Source File: PartyRankingPageVisitHistoryPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);

	getAdminChartDataManager().createApplicationActionEventPageModeDailySummaryChart(panelContent,NAME);

	panel.setCaption(NAME + "::" + PAGE_VISIT_HISTORY);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_RANKING_VIEW, ApplicationEventGroup.USER,
			NAME, parameters, pageId);

	return panelContent;

}
 
Example 11
Source File: MinistryRankingGovernmentBodyExpenditurePageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);

	panel.setCaption(NAME + "::" + GOVERNMENT_BODIES + parameters);

	governmentBodyChartDataManager.createMinistryGovernmentBodyExpenditureSummaryChart(panelContent);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 12
Source File: ParliamentChartsDecisionActivityByTypePageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

	decisionChartDataManager.createDecisionTypeChart(panelContent);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARLIAMENT_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);
	panel.setCaption(NAME + "::" + DECISION_ACTIVIY_DESCRIPTION);

	return panelContent;

}
 
Example 13
Source File: MinistryPageVisitHistoryPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final ViewRiksdagenMinistry viewRiksdagenMinistry = getItem(parameters);
	getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);

	createPageVisitHistory(NAME, pageId, panelContent);

	panel.setCaption(NAME + "::" + MINISTRY + viewRiksdagenMinistry.getNameId());
	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 14
Source File: ParliamentChartsPartyGenderPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();
	getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);


	final String pageId = getPageId(parameters);

	partyChartDataManager.createPartyGenderChart(panelContent);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARLIAMENT_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);
	panel.setCaption(NAME + "::" + PARTY_GENDER_DAILY_AVERAGE_FOR_ALL_BALLOTS);

	return panelContent;

}
 
Example 15
Source File: BallotOverviewPageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final List<ViewRiksdagenVoteDataBallotSummary> ballots = getItem(parameters);

	if (!ballots.isEmpty()) {						
		getBallotMenuItemFactory().createBallotMenuBar(menuBar, pageId);

		LabelFactory.createHeader2Label(panelContent,OVERVIEW);
		
		final DataContainer<ViewRiksdagenVoteDataBallotPartySummary, RiksdagenVoteDataBallotPartyEmbeddedId> dataPartyContainer = getApplicationManager()
				.getDataContainer(ViewRiksdagenVoteDataBallotPartySummary.class);
		
		final DataContainer<ViewRiksdagenCommitteeBallotDecisionSummary, ViewRiksdagenCommitteeBallotDecisionEmbeddedId> dataDecisionContainer = getApplicationManager()
				.getDataContainer(ViewRiksdagenCommitteeBallotDecisionSummary.class);

		final List<ViewRiksdagenVoteDataBallotPartySummary> partyBallotList = dataPartyContainer.findListByEmbeddedProperty(
				ViewRiksdagenVoteDataBallotPartySummary.class, ViewRiksdagenVoteDataBallotPartySummary_.embeddedId,
				RiksdagenVoteDataBallotPartyEmbeddedId.class, RiksdagenVoteDataBallotPartyEmbeddedId_.ballotId, pageId);

		final List<ViewRiksdagenCommitteeBallotDecisionSummary> decisionSummaries = dataDecisionContainer
				.getAllBy(ViewRiksdagenCommitteeBallotDecisionSummary_.ballotId, pageId);


		for (final ViewRiksdagenVoteDataBallotSummary viewRiksdagenVoteDataBallotSummary : ballots) {

			if (!decisionSummaries.isEmpty()) {

				getFormFactory().addFormPanelTextFields(panelContent, decisionSummaries.get(FIRST_OBJECT),
						ViewRiksdagenCommitteeBallotDecisionSummary.class,
						AS_LIST);

			} else {

				getFormFactory().addFormPanelTextFields(panelContent, viewRiksdagenVoteDataBallotSummary,
						ViewRiksdagenVoteDataBallotSummary.class,
						AS_LIST2);
			}

		}


		getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenVoteDataBallotPartySummary.class,
				partyBallotList, PARTY_BALLOT_SUMMARY,
				NESTED_PROPERTIES,
				COLUMN_ORDER,
				HIDE_COLUMNS,
				LISTENER, EMBEDDED_ID_PARTY, null);

		final VerticalLayout overviewLayout = new VerticalLayout();
		overviewLayout.setSizeFull();

		panelContent.addComponent(overviewLayout);
		panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);
		getBallotMenuItemFactory().createOverviewPage(overviewLayout, pageId);


		panel.setCaption(NAME + "::" + BALLOT + pageId);
		getPageActionEventHelper().createPageEvent(ViewAction.VISIT_BALLOT_VIEW, ApplicationEventGroup.USER, NAME,
				parameters, pageId);
	}
	return panelContent;

}
 
Example 16
Source File: MinistryRankingGovernmentOutcomePageModContentFactoryImpl.java    From cia with Apache License 2.0 4 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);

	panel.setCaption(NAME + "::" + GOVERNMENT_OUTCOME);

	governmentOutcomeChartDataManager.createGovernmentOutcomeChart(panelContent);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}
 
Example 17
Source File: GovernmentBodyOverviewPageModContentFactoryImpl.java    From cia with Apache License 2.0 3 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final List<GovernmentBodyAnnualSummary> item = getItem(parameters);
	
	if (item != null && !item.isEmpty()) {
		getGovernmentBodyMenuItemFactory().createGovernmentBodyMenuBar(menuBar, pageId);

		LabelFactory.createHeader2Label(panelContent, OVERVIEW);

		panel.setCaption(NAME + "::" + GOVERNMENT_BODY + pageId);

		final VerticalLayout overviewLayout = new VerticalLayout();
		overviewLayout.setSizeFull();

		panelContent.addComponent(overviewLayout);
		panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);
		getGovernmentBodyMenuItemFactory().createOverviewPage(overviewLayout, pageId);

		getPageActionEventHelper().createPageEvent(ViewAction.VISIT_GOVERNMENT_BODY_VIEW,
				ApplicationEventGroup.USER, NAME, parameters, pageId);
	}

	return panelContent;

}
 
Example 18
Source File: CommitteeOverviewPageModContentFactoryImpl.java    From cia with Apache License 2.0 3 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters);

	getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);

	LabelFactory.createHeader2Label(panelContent, OVERVIEW);

	final Link addCommitteePageLink = getPageLinkFactory().addCommitteePageLink(viewRiksdagenCommittee);
	panelContent.addComponent(addCommitteePageLink);

	getFormFactory().addFormPanelTextFields(panelContent, viewRiksdagenCommittee, ViewRiksdagenCommittee.class,
			AS_LIST);

	final VerticalLayout overviewLayout = new VerticalLayout();
	overviewLayout.setSizeFull();

	panelContent.addComponent(overviewLayout);
	panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);

	getCommitteeMenuItemFactory().createOverviewPage(overviewLayout, pageId);

	panelContent.setExpandRatio(addCommitteePageLink, ContentRatio.SMALL);

	panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);
	return panelContent;

}
 
Example 19
Source File: MinistryRankingAllRolesChartsPageModContentFactoryImpl.java    From cia with Apache License 2.0 3 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar);

	final String pageId = getPageId(parameters);

	final HorizontalLayout chartLayout = new HorizontalLayout();
	chartLayout.setSizeFull();

	final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager()
			.getDataContainer(ViewRiksdagenGovermentRoleMember.class);

	final List<ViewRiksdagenGovermentRoleMember> allMembers = govermentRoleMemberDataContainer.getAll();

	ministryGhantChartManager.createRoleGhant(panelContent, allMembers);

	panel.setCaption(NAME + "::" + CHARTS + parameters);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER,
			NAME, parameters, pageId);

	return panelContent;

}
 
Example 20
Source File: MinistryOverviewPageModContentFactoryImpl.java    From cia with Apache License 2.0 3 votes vote down vote up
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
	final VerticalLayout panelContent = createPanelContent();

	final String pageId = getPageId(parameters);

	final ViewRiksdagenMinistry viewRiksdagenMinistry = getItem(parameters);
	getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);

	LabelFactory.createHeader2Label(panelContent, OVERVIEW);

	final Link addMinistryPageLink = getPageLinkFactory().addMinistryPageLink(viewRiksdagenMinistry);
	panelContent.addComponent(addMinistryPageLink);

	getFormFactory().addFormPanelTextFields(panelContent, viewRiksdagenMinistry, ViewRiksdagenMinistry.class,
			AS_LIST);

	panelContent.setExpandRatio(addMinistryPageLink, ContentRatio.SMALL);

	panel.setCaption(NAME + "::" + MINISTRY + viewRiksdagenMinistry.getNameId());

	final VerticalLayout overviewLayout = new VerticalLayout();
	overviewLayout.setSizeFull();

	panelContent.addComponent(overviewLayout);
	panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);
	getMinistryMenuItemFactory().createOverviewPage(overviewLayout, pageId);

	getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME,
			parameters, pageId);

	return panelContent;

}