use of com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember in project cia by Hack23.
the class MinistryMemberHistoryPageModContentFactoryImpl method createContent.
@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 DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenMinistry.class);
final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId);
if (viewRiksdagenMinistry != null) {
getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, MEMBER_HISTORY);
final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenGovermentRoleMember.class);
getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenGovermentRoleMember.class, govermentRoleMemberDataContainer.getAllBy(ViewRiksdagenGovermentRoleMember_.detail, viewRiksdagenMinistry.getNameId()), MEMBER_HISTORY, 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;
}
use of com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember in project cia by Hack23.
the class MinistryCurrentMembersPageModContentFactoryImpl method createContent.
@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 DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenMinistry.class);
final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId);
if (viewRiksdagenMinistry != null) {
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;
}
use of com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember in project cia by Hack23.
the class PartyGovernmentRolesPageModContentFactoryImpl method createContent.
@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 DataContainer<ViewRiksdagenParty, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenParty.class);
final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);
if (viewRiksdagenParty != null) {
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, GOVERNMENT_ROLES);
final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenGovermentRoleMember.class);
getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenGovermentRoleMember.class, govermentRoleMemberDataContainer.findListByProperty(new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenGovermentRoleMember_.party, ViewRiksdagenGovermentRoleMember_.active), GOVERNMENT_ROLES, COLUMN_ORDER, HIDE_COLUMNS, new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, PERSON_ID), null, null);
pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
}
return panelContent;
}
use of com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember in project cia by Hack23.
the class MinistryRoleGhantPageModContentFactoryImpl method createContent.
@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 DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenMinistry.class);
final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId);
if (viewRiksdagenMinistry != null) {
getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, ROLE_GHANT);
final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenGovermentRoleMember.class);
final List<ViewRiksdagenGovermentRoleMember> allMembers = govermentRoleMemberDataContainer.getAllBy(ViewRiksdagenGovermentRoleMember_.detail, viewRiksdagenMinistry.getNameId());
ministryGhantChartManager.createRoleGhant(panelContent, allMembers);
panel.setCaption(NAME + "::" + MINISTRY + viewRiksdagenMinistry.getNameId());
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
}
return panelContent;
}
use of com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember in project cia by Hack23.
the class MinistryRankingAllRolesChartsPageModContentFactoryImpl method createContent.
@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;
}
Aggregations