Esempio n. 1
0
  public void changeTreeActionListener(ValueChangeEvent evt) {
    String nodeTypeToShow = DEFAULT_PROJECT_ID;

    this.projectId = (String) evt.getNewValue();
    // Put into the session the current project used.
    this.webSessionService.setAttribute(WebSessionService.PROJECT_ID, this.projectId);

    if (!this.projectId.equals(DEFAULT_PROJECT_ID)) {

      // Retrieve the entire project.
      this.project = this.projectService.getProject(this.projectId);

      nodeTypeToShow = WilosObjectNode.PROJECTNODE;

      // masquage de la exptable d'instanciation
      String projectId = (String) this.webSessionService.getAttribute(WebSessionService.PROJECT_ID);
      Project project = this.projectService.getProject(projectId);

      FacesContext context = FacesContext.getCurrentInstance();

      ProcessBean processBean =
          (ProcessBean)
              context
                  .getApplication()
                  .getVariableResolver()
                  .resolveVariable(context, "Woops2ProcessBean");

      ExpTableBean expTableBean =
          (ExpTableBean)
              context
                  .getApplication()
                  .getVariableResolver()
                  .resolveVariable(context, "ExpTableBean");

      if (project.getProcess() == null) {
        processBean.setSelectedProcessGuid("default");
        expTableBean.setSelectedProcessGuid("default");
        processBean.setIsVisibleExpTable(false);
        expTableBean.setIsInstanciedProject(false);
        expTableBean.getExpTableContent().clear();
      } else {
        processBean.setSelectedProcessGuid(project.getProcess().getGuid());
        expTableBean.setSelectedProcessGuid(project.getProcess().getGuid());
        processBean.setIsVisibleExpTable(true);
        expTableBean.setIsInstanciedProject(true);
      }
    }

    this.buildTreeModel();

    if (this.projectId.length() > 0) this.selectNodeToShow(this.projectId, nodeTypeToShow);
  }
Esempio n. 2
0
  public ProjectTO(Project _myproject) {
    this.setProcess(new ProcessTO(_myproject.getProcess()));

    this.setDescription(_myproject.getDescription());
    this.setCreationDate(_myproject.getCreationDate());
    this.setLaunchingDate(_myproject.getLaunchingDate());
    this.setIsFinished(_myproject.getIsFinished());
    this.setId(_myproject.getId());
    this.setConcreteName(_myproject.getConcreteName());
    this.setPlannedStartingDate(_myproject.getPlannedStartingDate());
    this.setPlannedFinishingDate(_myproject.getPlannedFinishingDate());
    this.setPlannedTime(_myproject.getPlannedTime());
  }