Example usage for com.vaadin.ui Panel setCaption

List of usage examples for com.vaadin.ui Panel setCaption

Introduction

In this page you can find the example usage for com.vaadin.ui Panel setCaption.

Prototype

@Override
    public void setCaption(String caption) 

Source Link

Usage

From source file:com.hack23.cia.web.impl.ui.application.views.user.ballot.pagemode.BallotOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from  ww  w  .  j  a  v  a  2 s .  c  o m*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<ViewRiksdagenVoteDataBallotSummary, RiksdagenVoteDataBallotEmbeddedId> dataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenVoteDataBallotSummary.class);

    final DataContainer<ViewRiksdagenVoteDataBallotPartySummary, RiksdagenVoteDataBallotPartyEmbeddedId> dataPartyContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenVoteDataBallotPartySummary.class);

    final DataContainer<ViewRiksdagenCommitteeBallotDecisionSummary, ViewRiksdagenCommitteeBallotDecisionEmbeddedId> dataDecisionContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenCommitteeBallotDecisionSummary.class);

    final List<ViewRiksdagenVoteDataBallotSummary> ballots = dataContainer.findListByEmbeddedProperty(
            ViewRiksdagenVoteDataBallotSummary.class, ViewRiksdagenVoteDataBallotSummary_.embeddedId,
            RiksdagenVoteDataBallotEmbeddedId.class, RiksdagenVoteDataBallotEmbeddedId_.ballotId, pageId);

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

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

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

        LabelFactory.createHeader2Label(panelContent, OVERVIEW);

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

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

        getBallotMenuItemFactory().createOverviewPage(overviewLayout, pageId);

        for (final ViewRiksdagenVoteDataBallotSummary viewRiksdagenVoteDataBallotSummary : ballots) {

            if (!decisionSummaries.isEmpty()) {

                getFormFactory().addFormPanelTextFields(panelContent,
                        new BeanItem<>(decisionSummaries.get(FIRST_OBJECT)),
                        ViewRiksdagenCommitteeBallotDecisionSummary.class,
                        Arrays.asList(new String[] { "embeddedId.id", "ballotId", "rm", "voteDate", "org",
                                "committeeReport", "embeddedId.issue", "title", "subTitle", "decisionType",
                                "embeddedId.concern", "ballotType", "winner", "totalVotes", "yesVotes",
                                "noVotes", "abstainVotes", "absentVotes", "approved", "endNumber",
                                "againstProposalParties", "againstProposalNumber" }));

            } else {

                getFormFactory().addFormPanelTextFields(panelContent,
                        new BeanItem<>(viewRiksdagenVoteDataBallotSummary),
                        ViewRiksdagenVoteDataBallotSummary.class,
                        Arrays.asList(new String[] { "embeddedId.ballotId", "rm", "voteDate",
                                "embeddedId.issue", "embeddedId.concern", "ballotType", "label", "totalVotes",
                                "yesVotes", "noVotes", "abstainVotes", "absentVotes", "approved" }));
            }

        }

        final BeanItemContainer<ViewRiksdagenVoteDataBallotPartySummary> partyBallotDataSource = new BeanItemContainer<>(
                ViewRiksdagenVoteDataBallotPartySummary.class, partyBallotList);

        getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, partyBallotDataSource,
                "Party Ballot Summary",
                new String[] { "embeddedId.ballotId", "embeddedId.concern", "embeddedId.issue",
                        "embeddedId.party" },
                new String[] { "embeddedId.party", "voteDate", "rm", "label", "embeddedId.concern",
                        "embeddedId.issue", "approved", "partyApproved", "totalVotes", "partyTotalVotes",
                        "yesVotes", "partyYesVotes", "noVotes", "partyNoVotes", "partyAbstainVotes",
                        "abstainVotes", "partyAbsentVotes", "absentVotes", "partyAvgBornYear", "avgBornYear",
                        "partyPercentageMale", "percentageMale", "ballotType", "embeddedId.ballotId" },
                new String[] { "embeddedId", "partyNoWinner", "partyPercentageYes", "partyPercentageNo",
                        "partyPercentageAbsent", "partyPercentageAbstain", "percentageYes", "percentageNo",
                        "percentageAbsent", "percentageAbstain", "voteDate", "rm", "label",
                        "embeddedId.concern", "totalVotes", "approved", "yesVotes", "noVotes", "ballotType",
                        "abstainVotes", "absentVotes", "embeddedId.ballotId", "noWinner" },
                new PageItemPropertyClickListener(UserViews.PARTY_VIEW_NAME, "embeddedId.party"),
                "embeddedId.party", null);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeBallotDecisionSummaryPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from   ww  w  .  j  a v  a  2  s  . c  o m
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, BALLOT_DECISION_SUMMARY);

        final DataContainer<ViewRiksdagenCommitteeBallotDecisionSummary, ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId> committeeBallotDecisionPartyDataContainer = getApplicationManager()
                .getDataContainer(ViewRiksdagenCommitteeBallotDecisionSummary.class);

        final List<ViewRiksdagenCommitteeBallotDecisionSummary> decisionPartySummaryList = committeeBallotDecisionPartyDataContainer
                .findOrderedListByProperty(ViewRiksdagenCommitteeBallotDecisionSummary_.org,
                        pageId.toUpperCase(Locale.ENGLISH),
                        ViewRiksdagenCommitteeBallotDecisionSummary_.createdDate);

        final BeanItemContainer<ViewRiksdagenCommitteeBallotDecisionSummary> committeeBallotDecisionPartyDataSource = new BeanItemContainer<>(
                ViewRiksdagenCommitteeBallotDecisionSummary.class, decisionPartySummaryList);

        getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent,
                committeeBallotDecisionPartyDataSource, "Committee Ballot Decision Summary",
                new String[] { "embeddedId.concern", "embeddedId.issue", "embeddedId.id" },
                new String[] { "voteDate", "embeddedId.concern", "embeddedId.id", "committeeReport",
                        "embeddedId.issue", "rm", "title", "subTitle", "endNumber", "org", "createdDate",
                        "publicDate", "ballotId", "decisionType", "againstProposalParties",
                        "againstProposalNumber", "winner", "ballotType", "label", "avgBornYear", "totalVotes",
                        "yesVotes", "noVotes", "abstainVotes", "absentVotes", "approved", "noWinner",
                        "percentageYes", "percentageNo", "percentageAbsent", "percentageAbstain",
                        "percentageMale" },
                new String[] { "embeddedId", "embeddedId.id", "endNumber", "org", "createdDate", "publicDate",
                        "ballotId", "decisionType", "label", "againstProposalNumber", "avgBornYear",
                        "percentageMale", "approved", "noWinner", "ballotType", "percentageYes", "percentageNo",
                        "percentageAbsent", "percentageAbstain" },
                new PageItemPropertyClickListener(UserViews.BALLOT_VIEW_NAME, "ballotId"), "ballotId", null);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeCurrentMembersHistoryPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override// w  ww.  j  a v a  2s. com
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, CURRENT_MEMBERS);

        final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager()
                .getDataContainer(ViewRiksdagenCommitteeRoleMember.class);

        final BeanItemContainer<ViewRiksdagenCommitteeRoleMember> currentMembersMemberDataSource = new BeanItemContainer<>(
                ViewRiksdagenCommitteeRoleMember.class,
                committeeRoleMemberDataContainer.findListByProperty(
                        new Object[] { viewRiksdagenCommittee.getEmbeddedId().getDetail(), Boolean.TRUE },
                        ViewRiksdagenCommitteeRoleMember_.detail, ViewRiksdagenCommitteeRoleMember_.active));

        getGridFactory().createBasicBeanItemGrid(panelContent, currentMembersMemberDataSource, CURRENT_MEMBERS,
                new String[] { "roleCode", "roleId", "personId", "firstName", "lastName", "party", "active",
                        "totalDaysServed", "detail", "fromDate", "toDate" },
                new String[] { "roleId", "personId", "detail", "active" },
                new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, "personId"), null, null);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeDecisionSummaryPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*w w  w.ja v  a  2  s.c o  m*/
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);

        final BeanItemContainer<ViewRiksdagenCommitteeDecisions> committeeDecisionDataSource = new BeanItemContainer<>(
                ViewRiksdagenCommitteeDecisions.class, decisionPartySummaryList);

        getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, committeeDecisionDataSource,
                DECISION_SUMMARY,
                new String[] { "embeddedId.hangarId", "embeddedId.id", "embeddedId.issueNummer" },
                new String[] { "createdDate", "publicDate", "committeeReport", "embeddedId.hangarId",
                        "embeddedId.id", "embeddedId.issueNummer", "rm", "decisionType", "winner", "title",
                        "header", "endNumber", "org", "committeeProposalUrlXml", "ballotId",
                        "againstProposalParties", "againstProposalNumber" },
                new String[] { "embeddedId", "embeddedId.hangarId", "embeddedId.id", "endNumber", "org",
                        "committeeProposalUrlXml", "ballotId", "againstProposalParties",
                        "againstProposalNumber", "createdDate" },
                new PageItemPropertyClickListener(UserViews.BALLOT_VIEW_NAME, "ballotId"), "ballotId", null);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeDecisionTypeDailySummaryPageModContentFactoryImpl2.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/* w w w .  jav  a2s.c  o m*/
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_TYPE_DAILY_SUMMARY);

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

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeDocumentActivityPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from  w w w.j  ava2 s .  co  m*/
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, DOCUMENT_ACTIVITY);

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

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeDocumentHistoryPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from   w  ww.  j a  v  a  2 s .c  o  m*/
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, DOCUMENT_HISTORY);

        final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager()
                .getDataContainer(ViewRiksdagenPoliticianDocument.class);

        final BeanItemContainer<ViewRiksdagenPoliticianDocument> politicianDocumentDataSource = new BeanItemContainer<>(
                ViewRiksdagenPoliticianDocument.class,
                politicianDocumentDataContainer.findOrderedListByProperty(
                        ViewRiksdagenPoliticianDocument_.org, viewRiksdagenCommittee.getEmbeddedId()
                                .getOrgCode().replace(" ", "").replace("_", "").trim(),
                        ViewRiksdagenPoliticianDocument_.madePublicDate));

        getGridFactory().createBasicBeanItemGrid(panelContent, politicianDocumentDataSource, "Documents",
                new String[] { "rm", "madePublicDate", "id", "docId", "personReferenceId", "roleDescription",
                        "title", "subTitle", "documentType", "subType", "org", "label", "numberValue", "status",
                        "tempLabel", "orderNumber", "referenceName", "partyShortCode" },
                new String[] { "id", "numberValue", "orderNumber", "tempLabel", "personReferenceId", "org",
                        "docId", "label", "roleDescription" },
                new PageItemPropertyClickListener(UserViews.DOCUMENT_VIEW_NAME, "docId"), null, null);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeMemberHistoryPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from  w ww.  j  a v  a  2  s .  c  o m*/
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, MEMBER_HISTORY);

        final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager()
                .getDataContainer(ViewRiksdagenCommitteeRoleMember.class);

        final BeanItemContainer<ViewRiksdagenCommitteeRoleMember> committeeRoleMemberDataSource = new BeanItemContainer<>(
                ViewRiksdagenCommitteeRoleMember.class,
                committeeRoleMemberDataContainer.getAllBy(ViewRiksdagenCommitteeRoleMember_.detail,
                        viewRiksdagenCommittee.getEmbeddedId().getDetail()));

        getGridFactory().createBasicBeanItemGrid(panelContent, committeeRoleMemberDataSource, MEMBER_HISTORY,
                new String[] { "roleCode", "roleId", "personId", "firstName", "lastName", "party", "active",
                        "totalDaysServed", "detail", "fromDate", "toDate" },
                new String[] { "roleId", "personId", "detail" },
                new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, "personId"), null, null);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from w ww  .j  a va  2  s.c o  m*/
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, OVERVIEW);

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

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

        getCommitteeMenuItemFactory().createOverviewPage(overviewLayout, pageId);

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

        getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(viewRiksdagenCommittee),
                ViewRiksdagenCommittee.class,
                Arrays.asList(new String[] { "embeddedId.detail", "active", "firstAssignmentDate",
                        "lastAssignmentDate", "totalAssignments", "totalDaysServed", "currentMemberSize" }));

        panelContent.setExpandRatio(addCommitteePageLink, ContentRatio.SMALL);

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

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteePageVisitHistoryPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from   w w w .j a v a2  s.  c om
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);

        createPageVisitHistory(NAME, pageId, panelContent);

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

}