Package org.dmrad.view.context

Examples of org.dmrad.view.context.ViewContext


      try {
        if (app.isConceptUpdateAllowed(getAppSession(),
            conceptConfig, entity, "remove")) {
          if (entities.remove(entity)) {
            ViewContext entityUpdateTablePageContext = new ViewContext(
                viewContext);
            setResponsePage(app.getViewMeta().getPage(
                "EntityUpdateTablePage", modelContext,
                entityUpdateTablePageContext));
          } else {
View Full Code Here


          entityPropertyTitle);
      add(entityPropertyTitleLabel);

      ModelContext entityPropertyListModelContext = new ModelContext(
          modelContext);
      ViewContext entityPropertyListViewContext = new ViewContext(
          viewContext);
      entityPropertyListViewContext.setWicketId("entityPropertyList");

      ListView entityPropertyDisplayListListView = app.getViewMeta()
          .getListView("EntityPropertyDisplayListListView",
              entityPropertyListModelContext,
              entityPropertyListViewContext);
View Full Code Here

      if (applicants != null) {
        applicantModelContext.setEntities(applicants);
        Applicant applicant = new Applicant(applicants.getDomainModel());
        applicantModelContext.setEntity(applicant);

        ViewContext applicantViewContext = new ViewContext(viewContext);
        applicantViewContext.setWicketId("entityUpdateForm");
        add(new ApplicantAddForm(applicantModelContext,
            applicantViewContext));
      }
    } catch (Exception e) {
      log.error("*** Problem with ApplicantAddFormPanel: "
View Full Code Here

      linkModelContext.setEntity(link);
      PropertyConfig urlPropertyConfig = link.getConceptConfig()
          .getPropertyConfig("url");
      linkModelContext.setPropertyConfig(urlPropertyConfig);
     
      ViewContext linkViewContext = new ViewContext(viewContext);
      linkViewContext.setWicketId("externalLink");
      linkViewContext.getMoreArgs().add("displayText", link.getName());
     
      ExternalLinkPanel externalLinkPanel = new ExternalLinkPanel(
          linkModelContext, linkViewContext);
      item.add(externalLinkPanel);
    } catch (Exception e) {
View Full Code Here

    String loginConcept = app.getModelConfig().getLoginConcept();
    Members members = (Members) app.getEntry(loginConcept);
    try {
      ModelContext menuModelContext = new ModelContext();
      menuModelContext.setDomainModel(app.getDomainModel());
      ViewContext menuViewContext = new ViewContext();
      menuViewContext.setApp(app);
      menuViewContext.setContextPage(this);
      menuViewContext.setPage(this);
      menuViewContext.setWicketId("dmRadMenuPanel");
      add(app.getViewMeta().getDmRadMenuPanel(menuModelContext,
          menuViewContext));

      add(new FeedbackPanel("loginFeedback"));

      ModelContext loginModelContext = new ModelContext();
      loginModelContext.setDomainModel(app.getDomainModel());
      loginModelContext.setEntities(members);
      loginModelContext.setEntity(new Member(members.getDomainModel()));
      ViewContext loginViewContext = new ViewContext();
      loginViewContext.setApp(app);
      loginViewContext.setContextPage(this);
      loginViewContext.setPage(this);
      loginViewContext.setWicketId("loginPanel");
      loginViewContext.setUpdate(true);
      add(app.getViewMeta().getLoginPanel(loginModelContext,
          loginViewContext));

      ModelContext confirmationModelContext = new ModelContext();
      confirmationModelContext.setDomainModel(app.getDomainModel());
      confirmationModelContext.setEntities(members);
      ViewContext confirmationViewContext = new ViewContext();
      confirmationViewContext.setApp(app);
      confirmationViewContext.setContextPage(this);
      confirmationViewContext.setPage(this);
      confirmationViewContext.setWicketId("newMemberConfirmPanel");
      confirmationViewContext.setUpdate(true);
      Panel newMemberConfirmPanel = app.getViewMeta().getNewMemberConfirmPanel(
          confirmationModelContext, confirmationViewContext);
      add(newMemberConfirmPanel);
      if (!app.getDomainModel().getModelConfig().isLogup()) {
        newMemberConfirmPanel.setVisible(false);
View Full Code Here

              modelContext);
          neighborModelContext.setContextEntities(entities);
          neighborModelContext.setContextEntity(entity);
          neighborModelContext.setEntities(neighborEntities);

          final ViewContext neighborViewContext = new ViewContext(
              viewContext);

          neighborLink = new PageLink("neighbor", new IPageLink() {
            static final long serialVersionUID = 200471L;
View Full Code Here

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

      ModelContext entryDisplayTableListViewModelContext = new ModelContext(
          modelContext);

      ViewContext entryDisplayTableListViewContext = new ViewContext(
          viewContext);
      entryDisplayTableListViewContext
          .setWicketId("entryDisplayTableListView");

      add(new EntryDisplayTableListView(
          entryDisplayTableListViewModelContext,
          entryDisplayTableListViewContext));
View Full Code Here

          IEntity firstEntity = (IEntity) entities.first();
          ModelContext firstEntityModelContext = new ModelContext(
              modelContext);
          firstEntityModelContext.setEntity(firstEntity);

          ViewContext firstEntityViewContext = new ViewContext(
              viewContext);

          WebPage firstWebPage = app.getViewMeta().getPage(
              "EntityDisplaySlidePage", firstEntityModelContext,
              firstEntityViewContext);
          setResponsePage(firstWebPage);
        }
      };
      add(firstLink);

      Link nextLink = new Link("next") {
        static final long serialVersionUID = 200582L;

        public void onClick() {
          IEntity nextEntity = findNextEntity(entities, entity);

          ModelContext nextEntityModelContext = new ModelContext(
              modelContext);
          nextEntityModelContext.setEntity(nextEntity);

          ViewContext nextEntityViewContext = new ViewContext(
              viewContext);

          WebPage nextWebPage = app.getViewMeta().getPage(
              "EntityDisplaySlidePage", nextEntityModelContext,
              nextEntityViewContext);
          setResponsePage(nextWebPage);
        }
      };
      add(nextLink);

      Link priorLink = new Link("prior") {
        static final long serialVersionUID = 200583L;

        public void onClick() {
          IEntity priorEntity = findPriorEntity(entities, entity);

          ModelContext priorEntityModelContext = new ModelContext(
              modelContext);
          priorEntityModelContext.setEntity(priorEntity);

          ViewContext priorEntityViewContext = new ViewContext(
              viewContext);

          WebPage priorWebPage = app.getViewMeta().getPage(
              "EntityDisplaySlidePage", priorEntityModelContext,
              priorEntityViewContext);
          setResponsePage(priorWebPage);
        }
      };
      add(priorLink);

      Link lastLink = new Link("last") {
        static final long serialVersionUID = 200584L;

        public void onClick() {
          IEntity lastEntity = (IEntity) entities.last();

          ModelContext lastEntityModelContext = new ModelContext(
              modelContext);
          lastEntityModelContext.setEntity(lastEntity);

          ViewContext lastEntityViewContext = new ViewContext(
              viewContext);

          WebPage lastWebPage = app.getViewMeta().getPage(
              "EntityDisplaySlidePage", lastEntityModelContext,
              lastEntityViewContext);
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));

      add(new FeedbackPanel("feedbackPanel"));

      ModelContext applicantModelContext = new ModelContext(modelContext);
      ViewContext applicantViewContext = new ViewContext(viewContext);
      applicantViewContext.setWicketId("applicantAddFormPanel");
      add(new ApplicantAddFormPanel(applicantModelContext,
          applicantViewContext));
    } catch (Exception e) {
      log.error("Error in ApplicantAddFormPage: " + e.getMessage());
    }
View Full Code Here

      ModelMeta modelMeta = domainModel.getModelMeta();
      IEntities childEntities = modelMeta.getNeighborEntities(
          parentEntity, childNeighbor);
      childModelContext.setEntities(childEntities);

      ViewContext childViewContext = new ViewContext(viewContext, true);
      childViewContext.setWicketId("childPropertyList");

      ListView childPropertyDisplayListListView = app.getViewMeta()
          .getListView("ChildPropertyDisplayListListView",
              childModelContext, childViewContext);
      add(childPropertyDisplayListListView);
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.