Package org.dmrad.view.context

Examples of org.dmrad.view.context.ViewContext


  public TopicListPanel(final ModelContext modelContext,
      final ViewContext viewContext) {
    super(modelContext, viewContext);
    try {
      ModelContext topicsModelContext = new ModelContext(modelContext);
      ViewContext topicsViewContext = new ViewContext(viewContext);
      topicsViewContext.setWicketId("topicList");
      TopicList topicList = new TopicList(topicsModelContext,
          topicsViewContext);
      add(topicList);
    } catch (Exception e) {
      log.error("Error in TopicListPanel: " + e.getMessage());
View Full Code Here


      ModelContext linkModelContext = new ModelContext(modelContext);
      Links topicLinks = (Links) topic.getLinks();
      Links approvedOrderedLinks = (Links) topicLinks.getApprovedLinks()
          .getLinksOrderedByName();
      linkModelContext.setEntities(approvedOrderedLinks);
      ViewContext linkViewContext = new ViewContext(viewContext);
      linkViewContext.setWicketId("linkListPanel");
      LinkListPanel linkListPanel = new LinkListPanel(linkModelContext,
          linkViewContext);
      item.add(linkListPanel);
    } catch (Exception e) {
      log.error("Error in TopicList: " + e.getMessage());
View Full Code Here

      final ViewContext viewContext) {
    try {
      App app = viewContext.getApp();

      ModelContext menuModelContext = new ModelContext(modelContext);
      ViewContext menuViewContext = new ViewContext(viewContext);
      menuViewContext.setWicketId("dmRadMenuPanel");
      add(app.getViewMeta().getDmRadMenuPanel(menuModelContext,
          menuViewContext));
    } catch (Exception e) {
      log.error("Error in DmLiteUpdatePage: "
          + modelContext.getEntitiesCode() + " - " + e.getMessage());
View Full Code Here

    super(modelContext, viewContext);
    try {
      ModelContext entryUpdateTablePanelModelContext = new ModelContext(
          modelContext);

      ViewContext entryUpdateTablePanelViewContext = new ViewContext(
          viewContext);
      entryUpdateTablePanelViewContext
          .setWicketId("entryUpdateTablePanel");
      entryUpdateTablePanelViewContext.setContextPage(this);
      entryUpdateTablePanelViewContext.setPage(this);
      entryUpdateTablePanelViewContext.setUpdate(true);

      add(new EntryUpdateTablePanel(entryUpdateTablePanelModelContext,
          entryUpdateTablePanelViewContext));
    } catch (Exception e) {
      log.error("Error in EntryUpdateTablePage: " + e.getMessage());
View Full Code Here

    super(modelContext, viewContext);

    ModelContext entryDisplayTablePageModelContext = new ModelContext(
        modelContext);

    ViewContext entryDisplayTablePageViewContext = new ViewContext(
        viewContext);

    add(new PageLink("displayEntry", new EntryDisplayTablePage(
        entryDisplayTablePageModelContext,
        entryDisplayTablePageViewContext)));

    ModelContext entryUpdateTablePageModelContext = new ModelContext(
        modelContext);

    ViewContext entryUpdateTablePageViewContext = new ViewContext(
        viewContext);
    entryUpdateTablePageViewContext.setUpdate(true);

    add(new PageLink("updateEntry", new EntryUpdateTablePage(
        entryUpdateTablePageModelContext,
        entryUpdateTablePageViewContext)));
  }
View Full Code Here

        } else {
          ModelContext entityDisplaySlidePanelModelContext = new ModelContext(
              modelContext);
          entityDisplaySlidePanelModelContext.setEntity(firstEntity);

          ViewContext entityDisplaySlidePanelViewContext = new ViewContext(
              viewContext);
          entityDisplaySlidePanelViewContext.setPage(this);
          entityDisplaySlidePanelViewContext.setUpdate(false);
          entityDisplaySlidePanelViewContext
              .setWicketId("entityDisplaySlidePanel");

          add(app.getViewMeta().getPanel("EntityDisplaySlidePanel",
              entityDisplaySlidePanelModelContext,
              entityDisplaySlidePanelViewContext));
        }
      } else {
        ModelContext entityDisplaySlidePanelModelContext = new ModelContext(
            modelContext);

        ViewContext entityDisplaySlidePanelViewContext = new ViewContext(
            viewContext);
        entityDisplaySlidePanelViewContext.setPage(this);
        entityDisplaySlidePanelViewContext.setUpdate(false);
        entityDisplaySlidePanelViewContext
            .setWicketId("entityDisplaySlidePanel");

        add(app.getViewMeta().getPanel("EntityDisplaySlidePanel",
            entityDisplaySlidePanelModelContext,
            entityDisplaySlidePanelViewContext));
View Full Code Here

      add(new Label("modelName", modelName));

      ModelContext entryUpdateTableListModelContext = new ModelContext(
          modelContext);

      ViewContext entryUpdateTableListViewContext = new ViewContext(
          viewContext);
      entryUpdateTableListViewContext
          .setWicketId("entryUpdateTableListView");

      add(new EntryUpdateTableListView(entryUpdateTableListModelContext,
          entryUpdateTableListViewContext));
    } catch (Exception e) {
View Full Code Here

      ModelContext lookupModelContext = new ModelContext(modelContext);
      lookupModelContext.setContextEntities(lookupModelContext
          .getEntities());
      lookupModelContext.setEntities(lookupEntities);

      ViewContext lookupViewContext = new ViewContext(viewContext);
      lookupViewContext.setWicketId("entityLookupTableListView");
      PageableListView entityLookupTableListView = app.getViewMeta()
          .getPageableListView("EntityLookupTableListView",
              lookupModelContext, lookupViewContext);
      add(entityLookupTableListView);
      if (!app.isConceptDisplayAllowed(getAppSession(),
View Full Code Here

      ModelContext applicantModelContext = new ModelContext();
      applicantModelContext.setDomainModel(app.getDomainModel());
      applicantModelContext.setEntities(applicants);
     
      ViewContext applicantViewContext = new ViewContext();
      applicantViewContext.setApp(app);
      applicantViewContext.setUpdate(true);
      applicantViewContext.setContextPage(contextPage);
     
      WebPage applicantPage = new ApplicantAddFormPage(
          applicantModelContext, applicantViewContext);
      Link applicantLink = new PageLink("applicant", applicantPage);
      add(applicantLink);
View Full Code Here

      ModelContext entityEditFormPanelModelContext = new ModelContext(
          modelContext);
      entityEditFormPanelModelContext.setAction("update");

      ViewContext entityEditFormPanelViewContext = new ViewContext(
          viewContext);
      entityEditFormPanelViewContext.setPage(this);
      entityEditFormPanelViewContext.setWicketId("entityEditFormPanel");

      add(app.getViewMeta().getPanel("EntityEditFormPanel",
          entityEditFormPanelModelContext,
          entityEditFormPanelViewContext));
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.dmrad.view.context.ViewContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.