Search in sources :

Example 1 with ViewRiksdagenCommitteeBallotDecisionPartySummary

use of com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartySummary in project cia by Hack23.

the class PartyCommitteeBallotDecisionSummaryPageModContentFactoryImpl 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, COMMITTEE_BALLOT_DECISION_SUMMARY);
        final DataContainer<ViewRiksdagenCommitteeBallotDecisionPartySummary, ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId> committeeBallotDecisionPartyDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommitteeBallotDecisionPartySummary.class);
        final List<ViewRiksdagenCommitteeBallotDecisionPartySummary> decisionPartySummaryList = committeeBallotDecisionPartyDataContainer.findOrderedListByEmbeddedProperty(ViewRiksdagenCommitteeBallotDecisionPartySummary.class, ViewRiksdagenCommitteeBallotDecisionPartySummary_.embeddedId, ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId.class, ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId_.party, pageId, ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId_.issue);
        getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenCommitteeBallotDecisionPartySummary.class, decisionPartySummaryList, COMMITTEE_BALLOT_DECISION_PARTY_SUMMARY, NESTED_PROPERTIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, BALLOT_ID, null);
        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;
}
Also used : ViewRiksdagenParty(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty) ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId) VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenCommitteeBallotDecisionPartySummary(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartySummary) Secured(org.springframework.security.access.annotation.Secured)

Aggregations

ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId)1 ViewRiksdagenCommitteeBallotDecisionPartySummary (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartySummary)1 ViewRiksdagenParty (com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty)1 VerticalLayout (com.vaadin.ui.VerticalLayout)1 Secured (org.springframework.security.access.annotation.Secured)1