Search in sources :

Example 1 with ViewRiksdagenCommitteeDecisions

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

the class CommitteeDecisionSummaryPageModContentFactoryImpl 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<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommittee.class);
    final ViewRiksdagenCommittee viewRiksdagenCommittee = dataContainer.load(pageId);
    if (viewRiksdagenCommittee != null) {
        getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, DECISION_SUMMARY);
        final DataContainer<ViewRiksdagenCommitteeDecisions, ViewRiksdagenCommitteeDecisionsEmbeddedId> committeeDecisionDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommitteeDecisions.class);
        final List<ViewRiksdagenCommitteeDecisions> decisionPartySummaryList = committeeDecisionDataContainer.findOrderedListByProperty(ViewRiksdagenCommitteeDecisions_.org, pageId, ViewRiksdagenCommitteeDecisions_.createdDate);
        getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenCommitteeDecisions.class, decisionPartySummaryList, DECISION_SUMMARY, NESTED_PROPERTIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, BALLOT_ID, null);
        panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    }
    return panelContent;
}
Also used : ViewRiksdagenCommitteeDecisionsEmbeddedId(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeDecisionsEmbeddedId) ViewRiksdagenCommitteeDecisions(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeDecisions) VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenCommittee(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee) Secured(org.springframework.security.access.annotation.Secured)

Aggregations

ViewRiksdagenCommittee (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee)1 ViewRiksdagenCommitteeDecisions (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeDecisions)1 ViewRiksdagenCommitteeDecisionsEmbeddedId (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeDecisionsEmbeddedId)1 VerticalLayout (com.vaadin.ui.VerticalLayout)1 Secured (org.springframework.security.access.annotation.Secured)1