Package org.dmlite.model.component.project

Examples of org.dmlite.model.component.project.Project


    this.viewContext = viewContext;
  }

  protected void populateItem(final ListItem item) {
    try {
      Project project = (Project) item.getModelObject();

      String projectName = project.getName();
      Label projectNameLabel = new Label("projectName", projectName);
      item.add(projectNameLabel);

      String projectObjective = project.getObjective();
      MultiLineLabel projectObjectiveLabel = new MultiLineLabel(
          "projectObjective", projectObjective);
      item.add(projectObjectiveLabel);

      String projectDescription = project.getDescription();
      MultiLineLabel projectDescriptionLabel = new MultiLineLabel(
          "projectDescription", projectDescription);
      item.add(projectDescriptionLabel);

      App app = (App) getApplication();
      Topics topics = (Topics) app.getEntry("Topics");
      Topic projectTopic = (Topic) topics.getTopic(project.getName());
      Links projectTopicLinks;
      if (projectTopic == null) {
        projectTopicLinks = new Links(project.getDomainModel());
      } else {
        projectTopicLinks = (Links) projectTopic.getLinks();
      }
      ModelContext linkModelContext = new ModelContext(modelContext);
      Links approvedOrderedLinks = (Links) projectTopicLinks
          .getApprovedLinks().getLinksOrderedByName();
      linkModelContext.setEntities(approvedOrderedLinks);
      ViewContext linkViewContext = new ViewContext(viewContext);
      linkViewContext.setWicketId("linkListPanel");
      LinkListPanel linkListPanel = new LinkListPanel(linkModelContext,
          linkViewContext);
      item.add(linkListPanel);

      ModelContext projectModelContext = new ModelContext(modelContext);
      projectModelContext.setEntity(project);
      PropertyConfig applicationPropertyConfig = project
          .getConceptConfig().getPropertyConfig("application");
      projectModelContext.setPropertyConfig(applicationPropertyConfig);
      ViewContext projectViewContext = new ViewContext(viewContext);
      projectViewContext.setWicketId("appLinkPanel");
      String webApplication = getLocalizer().getString("webApplication", this);
      if (webApplication.startsWith("[")) {
        webApplication = "Web Application";
      }
      projectViewContext.getMoreArgs().add("displayText", webApplication);
      ExternalLinkPanel appLinkPanel = new ExternalLinkPanel(
          projectModelContext, projectViewContext);
      item.add(appLinkPanel);

      ModelContext spiralsModelContext = new ModelContext(modelContext);
      Spirals spirals = project.getSpirals().getSpiralsOrderedByCode();
      spiralsModelContext.setEntities(spirals);
      ViewContext spiralsViewContext = new ViewContext(viewContext);
      spiralsViewContext.setWicketId("spiralTablePanel");
      spiralsViewContext.getMoreArgs().add("displayText", webApplication);
      EntityDisplayTablePanel spiralTablePanel = new EntityDisplayTablePanel(
View Full Code Here

TOP

Related Classes of org.dmlite.model.component.project.Project

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.